CJCoding With Joseph
15free / daySign inCreate account
Back to Code Walkthrough

Summing With a For Loop

C# code walkthrough · Question 28
easyLoops

Code

Read carefully. What does this print?
1int sum = 0;
2for (int i = 1; i <= 5; i++)
3{
4 sum += i;
5}
6Console.WriteLine(sum);

Your answer