Answer to Question #220670 in C++ for aahmed

Question #220670

#include <iostream.h>

using namespace std;

 

int main( void )

 {

int y;

int x = 3;

 

int total = 0;

 

while ( x <= 10 ) {

 y = x * x * x;

 cout<<y<<endl;

 total += y;

 ++x;

 } // end while

 

 Cout<< "The total is: "<< total <<end;

 

 } // end main


1
Expert's answer
2021-07-27T07:37:01-0400
#include <iostream>


using namespace std;

int main( void )
{

	int y;
	int x = 3;
	int total = 0;
	while ( x <= 10 ) {
		y = x * x * x;
		cout<<y<<endl;
		total += y;
		++x;

	} // end while
	cout<< "The total is: "<< total <<endl;
	int pause;
	cin>>pause;
	return 0;


} // end main






Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS