fork download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp4
  8. {
  9. class Wire
  10. {
  11. public int l, r;
  12. public Wire(int l, int r)
  13. {
  14. this.l = l;
  15. this.r = r;
  16. }
  17. }
  18.  
  19.  
  20. }
  21. class Program
  22. {
  23. static void Main(string[] args)
  24. {
  25. List<Wire[]> variants = new List<Wire[]>();
  26. for (int r = 0; r < 3; r++)
  27. for (int l = 0; l < 3; l++)
  28. for (int m = 0; m < 3; m++)
  29. {
  30. Wire[] a = new Wire[3];
  31. a[0] = new Wire(0, r);
  32. a[1] = new Wire(1, l);
  33. a[2] = new Wire(2, m);
  34. variants.Add(a);
  35. }
  36.  
  37. int f = 0;
  38. string ans = "0";
  39.  
  40. while (f == 3)
  41. {
  42.  
  43. for (int i = 1; i < 4; i++)
  44. for (int l = 1; l < 4; l++)
  45. {
  46. while (ans != "Y")
  47. {
  48. Console.WriteLine("C" + l);
  49. Console.WriteLine("W" + i);
  50. ans = Console.ReadLine();
  51. if (ans == "Y")
  52. {
  53. Console.Write(i);
  54. Console.WriteLine(l);
  55.  
  56. f = f + 1;
  57.  
  58. }
  59. }
  60. }
  61. }
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68. }
  69.  
  70. }
Compilation error #stdin compilation error #stdout 0s 130944KB
stdin
Standard input is empty
compilation info
prog.cs(25,14): error CS0246: The type or namespace name `Wire' could not be found. Are you missing `ConsoleApp4' using directive?
prog.cs(30,21): error CS0246: The type or namespace name `Wire' could not be found. Are you missing `ConsoleApp4' using directive?
prog.cs(31,32): error CS0246: The type or namespace name `Wire' could not be found. Are you missing `ConsoleApp4' using directive?
prog.cs(31,21): error CS0841: A local variable `a' cannot be used before it is declared
prog.cs(32,32): error CS0246: The type or namespace name `Wire' could not be found. Are you missing `ConsoleApp4' using directive?
prog.cs(32,21): error CS0841: A local variable `a' cannot be used before it is declared
prog.cs(33,32): error CS0246: The type or namespace name `Wire' could not be found. Are you missing `ConsoleApp4' using directive?
prog.cs(33,21): error CS0841: A local variable `a' cannot be used before it is declared
prog.cs(34,21): error CS0841: A local variable `variants' cannot be used before it is declared
Compilation failed: 9 error(s), 0 warnings
stdout
Standard output is empty