Answer to Question #301197 in C++ for Chubby

Question #301197

Make a c++ program using nested loop that will display this output:


11 12 13 14 15

11 12 13 14

11 12 13

11 12

11


1
Expert's answer
2022-02-22T12:13:26-0500
#include <iostream>
using namespace std;

int main() {
    int start=11;
    int end=16;

    while (end > start) {
        for (int i=start; i<end; i++) {
            cout << i << " ";
        }
        cout << endl;
        end--;
    }

    return 0;
}

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