World's most popular travel blog for travel bloggers.

Write a C program to generate the following pattern:

, , No Comments

Question 3: Write a C program to generate the following pattern: (10 Marks)
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5



Ans.
 #include<stdio.h>
#include <conio.h>
void main()
{
int i,j;
for(i=1;i<=5;i++)
{
for(j=1;j<=5;j++)
{
scanf(“%d”,j);
}
}
getch();
}

0 comments:

Post a Comment

Let us know your responses and feedback