Print pattern in cpp using dsa

technical talkiess
0

 


// use the labrarey


#include <iostream>

// using the namespace 

using namespace std;

// ; means end progran line 

// endl means new line 

// \n means new line

// start the program 

int main(){

int n;

int a = 1;

cout<<"Enter the number:- ";

cin>>n;

  while(a<=n)

  {

   int j = 1;

   while(j<=n){

       cout<<a;

       j++;

   }

   cout<<endl;

   a++;

  }

 }


Tags

Post a Comment

0Comments

Thanks you for commenting your questions. I will see question and respond you.

Post a Comment (0)