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
*
**
***
****
*****
Google Ads
Friday, May 29, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment