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 |
which of the following shows the correct hierarchy of arithmetic operations in C a) (), **, * or/,+ or - b) (),**,*,/,+,- c) (),**,/,*,+,- d) (),/ or *,- or +
Which of the following about the C comments is incorrect ? a.commentscan go over multiple lines b.comments can start any where in the line c.a line can contain comments with out any language statements d.comments can occur within comments
What is the mean of function?
How to Clear last bit if it 1 using Macro TURN_OFF_BIT_LAST
Why is the code below functioning. According to me it MUST NOT.
What does void main () mean?
what is link list?
Explain the difference between struct and union.
Which is better malloc or calloc?
I need to take a sentence from input and sort the words alphabetically using the C programming language. Note: This is C not C++. qsort and strtok not allowed
How arrays can be passed to a user defined function
Explain the difference between #include "..." And #include <...> In c?