Given an integer number find the sum of all the numbers


Question: Given an integer number, find the sum of all the numbers from 1 to this number.Example: If the number given is 5, the program should display 1+2+3+4+5=15If the generated number is 777 and the number given by the user is 11, the program should display something like the following: The number generated by the computer is 777 Please give me a number to test if it is a factor of this number: 11 Sorry, 777 is not a multiple of 11.

Write a program that receives a series of numbers from the user and allows the user to press the enter key to indicate that he or she is finished providing inputs. After the user presses the enter key, the program should print the sum of the numbers and their average.

Solution Preview :

Prepared by a verified Expert
Computer Engineering: Given an integer number find the sum of all the numbers
Reference No:- TGS02261201

Now Priced at $10 (50% Discount)

Recommended (99%)

Rated (4.3/5)