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
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).