/*
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=0;j<=i;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
Output:
Star Series:*
**
***
****
*****
No comments:
Post a Comment