โ Back to Loops
Question 102
For Loop: Sum of Squares 1 to 5
For Loop: Sum of Squares 1 to 5
Use aforloop to add up the squares of the numbers 1 through 5 (that is1*1 + 2*2 + 3*3 + 4*4 + 5*5) and print the total. Expected output: 55
Expected Output:
55
Topics:
Loops
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (clog, fn, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.