How to print star pattern in reverse order?

CODE




How to print star pattern in reverse order?
int main()
{
    int i,j;
    for(i=4;i>=1;i--)
    {
        for(j=1;j<=i;j++)
            printf(" * ");
        printf("\n");
    }
}


Output:
 *  *  *  *
 *  *  *
 *  *
 *

How to print star pattern in reverse order? How to print star pattern in reverse order? Reviewed by Unknown on December 16, 2018 Rating: 5

No comments:

If you have any doubt or query ,comment below:

Programming copyright © 2018-19. Powered by Blogger.