Program to output as below formate:
1
2 3
4 5 6
7 8 9 10
Answer Posted / koushik sarkar
#include<stdio.h>
#include<conio.h>
void main()
{
int i=1,j,k;
clrscr();
for(j=0;j<4;j++)
{
for(k=0;k<=j;k++)
{
printf("%d "",i);
i++;
}
printf("\n");
}
getch();
}
| Is This Answer Correct ? | 6 Yes | 1 No |
Post New Answer View All Answers
What is the public field modifier?
What are the main uses of the super keyword?
What is a class component?
How can we create objects if we make the constructor private ?
What is externalizable?
What is the purpose of skeleton and stub?
what do you understand by synchronization? : Java thread
Does java support function overloading, pointers, structures, unions or linked lists?
What is the size of int in 64-bit jvm?
What is defined as false sharing in the context of multithreading?
When will we prefer to use set and list in java and why?
Name some classes present in java.util.regex package.
Difference between method overloading and overriding.
What are the escape sequences in java?
Can a constructor call the constructor of parent class?