Chapter+4Ex+4.15

4.15
 * exercise number:**
 * description of objective:**

code format="cpp" using namespace std;//refer to namespace
 * code:**
 * include //include basic head files
 * 1) include //include basic head files
 * 2) define w cout.width(30)//define w as reserving 30 spaces
 * 3) define e cout<>starting;//input value to starting temp = starting;//reserve the value of "starting" w;//reserve 30 spaces and allign to the left cout<<"Enter ending number: ";//expecting a second ending value cin>>ending;//ending value input int sum=starting;//set the primary value of sum, where it is used to add continuously later on   while(starting<ending){//loops untill finish adding from the starting to the ending value starting+=1;//starting + 1 everytime it loops sum += starting;//sum add by starting value in every loops.\ }           e;//new line, as previously defined cout<<"The sum of integers between "<<temp<<" to "<<ending<<" is "<<sum;//print out result cin.ignore(100,'\n');//ignore user input to avoid unexpected ending cin.get;//stop from program jumping out system("PAUSE"); return EXIT_SUCCESS; }**

code