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


Expert's answer

#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!

LATEST TUTORIALS
APPROVED BY CLIENTS