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 |
Write a program that can show the multiplication table.
Given an array of length N containing integers between 1 and N, determine if it contains any duplicates.
What will happen when freeing memory twice
program to print upper & lower triangle of a matrix
What is the newline escape sequence?
sir, i cannot find the way how to write aprogram by using array on queue
what is the output for this question: main() { int i=1; printf("%d%d%d",i,i++,++i); }
Tell me when is a void pointer used?
Which header file should you include if you are to develop a function which can accept variable number of arguments?
no consistent academics. how to answer the question
1.find the second maximum in an array? 2.how do you create hash table in c? 3.what is hash collision
code for selection sort?