Knaph

Control Flow and Functions21 of 62

Sum to N

Read an integer n from standard input. Using a for loop, sum every integer from 1 to n inclusive, and print the total.

Sign in to try this exercise.