Google Ads

Friday, May 29, 2009

Stars1 - program

To print increasing the stars


#include"stdio.h"
#include"conio.h"
void main()
{
int i,j,n;
clrscr();
printf("Enter the Value for N: ");
scanf("%d",&n);
for(i=0;i<=n;i++)
{
for(j=0;j<=i;j++)
{
printf(" * ");
}
printf("\n");
}

getch();

}


Output will be

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

No comments:

Post a Comment