/* Print star series.
*****
****
***
**
*
*/
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j;
clrscr();
printf("Star Series:\n");
for(i=0;i<5;i++)
{
for(j=i;j<=4;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
Output:
Star Series:*****
****
***
**
*
No comments:
Post a Comment