Program to print the below pattern
1
22
333
4444
55555
#include<bits/stdc++.h>
using namespace std;
int main()
{
for(int i=1;i<=5;i++){ //1st loops holds count
for(int j=1;j<=i;j++){ //2nd loop prints i
cout<<i;
}
cout<<endl;
}
return 0;
}
Output
1
22
333
4444
55555
0 Comments