Loading...

Pattern-5

Programme:

#include <stdio.h>

int main()
{
    int n;
    printf("Enter the no of rows : ");
    scanf("%d",&n);
    int i, j;
    for(i=n;i>=1;i--)
    {
        for(j=1;j<=i;j++)
        {
            printf("*");
        }
        printf("\n");
    }
    return 0;
}

Output:

Enter the no of rows : 5
*****
****
***
**
*