Loading...

to add stars in decreasing order


// to add stars in decreasing order
#include<stdio.h>
#include<conio.h>
void main()
{
    int a,b,c;
    clrscr();
    printf("Enter the numberof lines ");
    scanf("%d",&a);
    for(b=1;b<=a;b++)
    {
        for(c=1+a-b;c>=1;c--)
           printf("*");
        printf("\n");
    }
    getch();
}


123 Sample Rd, Samplington, SA 12345
(555) 0123