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 are conditionals and its types?
How can constructor chaining be done by using the super keyword?
What is map and hashmap in java?
Does isempty check for null?
What does serializing data mean?
Can you explain the meaning of aggregation and composition
What is the use of a copy constructor?
What is method reference?
What is double checked locking in singleton?
Give reasons supporting that string is immutable.
Explain about main thread in java?
What is the static keyword?
What are the two types of java?
What is a vararg?
What methodology can be utilized to link to a database?