Computer Science, asked by 91mirjas, 1 month ago

WAP to display the following pattern in C++ 1234
234
34
4

Answers

Answered by anindyaadhikari13
8

Answer:

This is the required C++ program for this question.

#include <iostream>

using namespace std;

int main() {

int i,j;

for(i=1;i<=4;i++) {

for(j=i;j<=4;j++)

cout << j << " ";

cout << endl;

}

return 0;

}

Explanation:

  • Outer loop iterates in the range i = 1 to 4. Inner loop iterates in the range j = 1 to i. After each iteration of inner loop, value of j is displayed on the screen and after displaying the row, a new line is added.
Answered by debdyuti292009
0

Answer:

please see the picture.. it has the answer

Attachments:
Similar questions