Skip to content
menu
arrow_back
CJ
Coding With Joseph
search
light_mode
Light
desktop_windows
System
dark_mode
Dark
bolt
15
free / day
Sign in
Create account
←
Back to Code Walkthrough
For Loop Sum 1 to 5
C# code walkthrough · Question 6
easy
Loops
Code
Read carefully. What does this print?
1
int
sum
=
0
;
2
for
(
int
i
=
1
;
i
<=
5
;
i
++
)
3
{
4
sum
+=
i
;
5
}
6
Console
.
WriteLine
(
sum
)
;
Your answer
What will this code output?
Submit answer
←
Previous
Next
→
home
Home
grid_view
Problems
calendar_today
Daily
workspace_premium
Pricing
menu
Menu