Computer Science, asked by pratik993443, 9 months ago

write a c++ program in following pattern
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5​

Attachments:

Answers

Answered by devc5622
0

Answer:

include<iostream.h>

int main(){

   int i, j, n;

   cout<<"Enter the number of lines required: ";

   cin>>%d>>&n;

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

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

           cout<<%d<<"\t"<<j;

       }

   cout<<"\n\n";

   }

   return 0;

}

Explanation:

this might be the one

Similar questions