Computer Science, asked by sakshikumari0298, 1 month ago

write a program in c++to display the following pattern.
1
22
333
4444
55555​

Answers

Answered by anindyaadhikari13
6

Solution:

The given códe is written in C++.

#include <iostream>

using namespace std;

int main() {

for(int i=1;i<=5;i++) {

for(int j=1;j<=i;j++)

cout<<i;

cout<<endl;

}

}

Output:

1

22

333

4444

55555

For verification, see the attachment.

•••♪

Attachments:
Similar questions