In this C program, we will print a Pattern of Numbers, called "Half-Pyramid" on the screen. The Range(i.e : No. of Rows) will be taken from the user. color>
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2
1 2 3
1 2 3 4
1 2 3 4 5
input:
The number of rows- The Range.output:
The pattern will be printed on the screen.CODE---->
#include
int main()
{
int i,j,n;
printf(" Please, Enter the Range : ");
scanf("%d",&n);
for(i=1;in;i++)
{
for(j=1;ji;j++)
{
printf("%d ",j);
}
printf("\n");
}
return 0;
}
color>