โ Back to Loops
Question 57
Sum 1 to 50 (for)
Sum 1 to 50 (for)
Compute the sum of numbers from 1 to 50 using a for loop and print 'Sum: 1275'.
Expected Output:
Sum: 1275
Topics:
Loops
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (sysout, psvm, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.