Write a program to produce the following output:
1
2 3
4 5 6
7 8 9 10
Answer / ashok kumar
void main()
{
int n,i,j,k=1;
clrscr();
printf("\n Enter a number : ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=i;j<n;j++)
printf(" ");
for(j=1;j<=i;j++)
printf(" %d ",k++);
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 31 Yes | 19 No |
How can I call fortran?
What is the difference between c &c++?
Which is the best website to learn c programming?
Do string constants represent numerical values?
What are the features of c languages?
What is difference between structure and union in c programming?
Which programming language is best for getting job 2020?
What is default value of global variable in c?
Who developed c language?
Write a routine that prints out a 2-D array in spiral order!
What 'lex' does?
what are non standard function in c