fork download
  1. using System;
  2.  
  3. public class Test
  4. {
  5. public static void Main()
  6. {
  7. int i;
  8. int sum;
  9. int[] a=new int[8];
  10. a[0]=0;
  11. a[1]=6;
  12. a[2]=1;
  13. a[3]=7;
  14. a[4]=1;
  15. a[5]=3;
  16. a[6]=4;
  17. a[7]=5;
  18.  
  19.  
  20.  
  21. Sum = 0;
  22. for(i = 0; i < a; i++)
  23. Sum = Sum + a[i];
  24.  
  25. }
  26. }
Compilation error #stdin compilation error #stdout 0s 131520KB
stdin
Standard input is empty
compilation info
prog.cs(21,1): error CS0103: The name `Sum' does not exist in the current context
prog.cs(22,12): error CS0019: Operator `<' cannot be applied to operands of type `int' and `int[]'
prog.cs(23,8): error CS0103: The name `Sum' does not exist in the current context
prog.cs(23,2): error CS0103: The name `Sum' does not exist in the current context
Compilation failed: 4 error(s), 0 warnings
stdout
Standard output is empty