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 iArray = new i[10];
  12. foreach (int i in iArray)
  13. {
  14. if (i/3==c);
  15. console.WriteLine("Число яке ділиться на 3 це {0}", i);
  16. if (i/5==c);
  17. console.WriteLine("Число яке ділиться на 5 це {0}", i);
  18. if (i/7==c);
  19. console.WriteLine("Число яке ділиться на 7 це {0}", i);
  20. }
  21. } // End of Main function (program statup)
  22. } // End of SampleClass
  23. } // End of SampleNamespace
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(15,20): warning CS0642: Possible mistaken empty statement
prog.cs(17,20): warning CS0642: Possible mistaken empty statement
prog.cs(19,20): warning CS0642: Possible mistaken empty statement
prog.cs(11,30): error CS0246: The type or namespace name `i' could not be found. Are you missing a using directive or an assembly reference?
prog.cs(12,13): error CS1579: foreach statement cannot operate on variables of type `int' because it does not contain a definition for `GetEnumerator' or is inaccessible
Compilation failed: 2 error(s), 3 warnings
stdout
Standard output is empty