โ Back to Loops
Question 204
Sum of Evens 1 to 10
Sum of Evens 1 to 10
Use a for loop to add up only the even numbers from 1 to 10, then print the total in this exact format: Sum of evens: 30
Expected Output:
Sum of evens: 30
Topics:
Loops
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.