write a c++ program in following pattern
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
Attachments:
![](https://hi-static.z-dn.net/files/d60/39563c7bc85060edfdfc5121f159ed91.jpg)
Answers
Answered by
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