Answer to Question #28603 in C++ for bala
pyramid should look like this
except that it should be 20 lines high, instead of the 5 lines shown here. One way to do this is to
nest two inner loops, one to print spaces and one to print Xs, inside an outer loop that steps
down the screen from line to line.
for (int i= 0; i < 20; i++) // for i = 0 to i < 20
for(int j = 0; j <= i; j++) // for j = 0 to j <= i
cout<< "X"; // print X
cout<< endl; // print end of line
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!