fork download
  1. using System;
  2.  
  3. namespace SampleNamespace
  4. {
  5. public class SampleClass
  6. {
  7. public static void Main()
  8. {
  9. bool c = true;
  10. int a;
  11. int i;
  12. int iArray = new i[10];
  13. foreach (int i in iArray)
  14. {
  15. if (i/3==c);
  16. Console.WriteLine("Число яке ділиться на 3 це {0}", i);
  17. if (i/5==c);
  18. Console.WriteLine("Число яке ділиться на 5 це {0}", i);
  19. if (i/7==c);
  20. Console.WriteLine("Число яке ділиться на 7 це {0}", i);
  21. }
  22. } // End of Main function (program statup)
  23. } // End of SampleClass
  24. } // End of SampleNamespace
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(13,26): error CS0136: A local variable named `i' cannot be declared in this scope because it would give a different meaning to `i', which is already used in a `parent' scope to denote something else
prog.cs(11,17): (Location of the symbol related to previous error)
prog.cs(16,20): warning CS0642: Possible mistaken empty statement
prog.cs(18,20): warning CS0642: Possible mistaken empty statement
prog.cs(20,20): warning CS0642: Possible mistaken empty statement
Compilation failed: 1 error(s), 3 warnings
stdout
Standard output is empty