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();
}
Comments
Leave a comment