Q:

write program to generate following pattern

0

write program to generate following pattern

1

1 2

1 2 3

1 2 3 4

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program:

#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
printf("%d ",j);
}
printf("\n");
}
getch();
}

Output:

1
1 2
1 2 3
1 2 3 4

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Programming Exercises With Solutions

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
write program to generate following pattern... >>
<< write program to generate following pattern...