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

Inverted Half-Pyramid using Asterisk(*) in C-Language



In this C-program we will Print the inverted "Half-Pyramid" using Asterisks(*). The no. of rows will be taken from the user.color>

*****
****
***
**
*

input:

NULL.

output:

The Pattern will be printed on the screen in the given range.

CODE---->


#include
int main()
{
int i,j,n;
printf(" Please, Enter the no. of Rows : ");
scanf("%d",&n);
if(n0)
{
printf("\n Please, Enter a Positive number.");
printf("\n Wrong Input.");
exit(0);
}
for(i=n;i>=1;i--)
{
for(j=i;j>=1;j--)
{
printf("*");
}
printf("\n");
}
return 0;
}





Download the C-Program file of this Program.
Download the EXE file of this program.

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

RESULT:color>






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

Share the post

Inverted Half-Pyramid using Asterisk(*) in C-Language

×

Subscribe to Programjoy.blogspot.com

Get updates delivered right to your inbox!

Thank you for your subscription

×