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 maximum size of byte array in java?
Are global variables initialized to zero?
What is type safety in java?
What do you mean by multithreaded program?
Does a class inherit the constructors of its superclass in java programming?
Explain about interthread communication and how it takes place in java?
Why multiple inheritance is not supported by java?
How do you replace all in word?
What is exception in java?
Is stringwriter thread safe?
If an application has multiple classes in it, is it okay to have a main method in more than one class?
Explain where variables are created in memory?
Explain the purpose of garbage collection in Java?
What is the purpose of the system class in java?
What is function and method in java?