Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

C-Program of Printing Half Pyramid using 123(Numbers)

Tags: number screen row




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

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;
}





Don't just read, write it, run it.....color>

RESULT:color>





This post first appeared on ProgramJoy.blogspot.com, please read the originial post: here

Share the post

C-Program of Printing Half Pyramid using 123(Numbers)

×

Subscribe to Programjoy.blogspot.com

Get updates delivered right to your inbox!

Thank you for your subscription

×