Im doing a program for one of my classes and im no good.
here is the question
Write a program that computes and displays the sum of all integers from 1 to an ENDING number, using a while loop. Prompt the user for the ending number. For example, if the user enters 99, then the program will compute the sum of all the integers from 1 to 99 and would display the final sum of 4950.
Im no sure how to do the while loop and add the intergers. If some can show me how to write this program then i just might understand it. All help is appreciated.