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 multi level inheritance in java?
Can java inner class be static?
What are voids?
What are singleton services?
What is a finally block?
Can a singleton class be inherited?
Can you override static methods?
what is meant by Garbage collection?
What is hash table in java?
How many inner classes can a class have?
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What is charat ()?
What is an example of a boolean?
Compare overloading and overriding?
What is the purpose of the main method?