anndy smaals

anndy smaals

  • NA
  • 24
  • 4.3k

code not compiling, cant find the problem?

Dec 8 2018 8:33 AM
using System;

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
int sum = 0;

for(int sum = 0; i < 5; i++)
{
sum += i;
}

for(int i > 0; i--)
{
sum += i;
}
Console.WriteLine(sum);
}
}
}

Answers (2)