+ 2
Write program by c++ to print this pattern like number triangle
the out put is 1 2 3 4 5 6 7 8 9 10
2 Réponses
+ 8
int x=1;
for(int i=1;i<=n;i++) //no. Of steps
{
for(int j=1;j<=i;j++)
cout<<x++;
cout<<endl;
}
+ 1
thanks for answering