Star Triangle Descending (LTR)

By Developgram - January 10, 2017

/*
Summary: Print stars in descending order from left to right.
*/

#include<stdio.h>

int main()
{
    int row, col, n;

    printf("Enter the number of rows: ");
    scanf("%d", &n);

    for(row=n; row>=1; row--)
    {
        for(col=1; col<=row; col++)
            printf("* ");
        printf("\n");
    }

    return 0;
}

  • Share:

You Might Also Like

0 comments