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
#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;
}
Comments
Leave a comment