Sunday, August 7, 2011

To generate pattern*** ** *


#include<stdio.h>

void main()
{
int i,j,n;
clrscr();
printf("how many lines you need to print :");
scanf("%d",&n);
for(i=n;i>0;i--)
   {
   for(j=0;j<=i;j++)
      {
      printf("*");
      }
    printf("\n");
   }
getch();
}

No comments:

Post a Comment