006-001-003
For Loop: Sum Calculator Program
Easy
Problem Description
for loop: Sum Calculator Program
In this problem, you will create a program that uses a for loop to add integers from 1 to a specified number sequentially and displays the total sum to standard output.
Learning Objective: Learn cumulative calculation using for loops
Create a program that calculates the sum from 1 to the input number.
Input
Line 1: End number (integer, 1 to 10)
Output
Sum from 1 to [end]: [sum]
Ready to Try Running Code?
Log in to access the code editor and execute your solutions for this problem.
Don't have an account?
Sign Up