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
Why super is first line in java?
What is the definition of tree ?
What is a 16 bit word?
What are the rules for variable declaration?
What is a parameter in simple terms?
What is the main function in java?
Are arrays primitive data types?
What is a superclass?
What is pre increment and post increment in java?
Explain the selection sort algorithm?
What is java reflection api?
Is void a type?
What is an example of a conditional statement?
Define "Access specifiers" in java.
Why main() method is public, static and void in java ?