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 difference between super class & sub class?
What is the difference between logical data independence and physical data independence?
How do you delete a list in java?
How can you add and remove nodes in jtree?
What are the legal parameters?
How large is a boolean?
You can create a string object as string str = “abc”; why cant a button object be created as button bt = “abc”;? Explain
What is a Hash Table? What are the advantages of using a hash table?
What is return type in java?
Is java a super set of javascript?
Is an integer an object?
Is this valid in java ? Can we instantiate interface in java?
What is threaded programming and when is it used? : Java thread
Write a java program to print fibonacci series?
Is int a class in java?