fork download
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. int sum;
  8.  
  9. for (int i = 0; i <= 1000; i++) {
  10. if (i % 3 == 0 || i % 5 == 0) {
  11. sum += i;
  12. }
  13. }
  14.  
  15. Console.WriteLine(sum);
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cs(11,5): error CS0165: Use of unassigned local variable `sum'
prog.cs(15,21): error CS0165: Use of unassigned local variable `sum'
Compilation failed: 2 error(s), 0 warnings
stdout

Standard output is empty