Answer to Question #18820 in C++ for mat

Question #18820
Q:
write a programm to get the following out put when we enter n=4.
1
22
333
4444
sir, i hv attempted the following question but i cannot get in the required format.below is my programing code.
#include<iostream.h>
#include<conio.h>
void main()
{
int i,j,n;
clrscr();
cout<<"n=";
cin>>n;
for(i=0;i<n;i++)
{
for(j=i;j<n;j++)
{
cout<<j;
}
}
getch();
}
0
Expert's answer

Answer in progress...

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