C++ program to print the number pattern 1 | print the given number pattern

 


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

Post a Comment

0 Comments