Page 1 of 1

2. Write a program that asks the user for an integer. Using a loop, calculate the sum of all integers from 1 to the give

Posted: Mon Jul 11, 2022 9:51 am
by answerhappygod
2 Write A Program That Asks The User For An Integer Using A Loop Calculate The Sum Of All Integers From 1 To The Give 1
2 Write A Program That Asks The User For An Integer Using A Loop Calculate The Sum Of All Integers From 1 To The Give 1 (19.97 KiB) Viewed 41 times
2. Write a program that asks the user for an integer. Using a loop, calculate the sum of all integers from 1 to the given number, and print out that value. For example, if the user types in 5, the output should be 15 (1+2+3+4+5).