Answer to Question #32511 in C++ for aman

Question #32511
write a program for the following way
1
12
123
1234
12345
1
Expert's answer
2013-06-27T08:29:18-0400
#include <iostream>
using namespace std;

int main(void)
{
int i, j, n;
cout <<"Enter number: ";
cin >> n;

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

for(j = 1;j <= i; j++)
cout<< j;
}

return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS