Login to ask a question from Pattern Printing in C

C program to print following Pyramid:

*

**

***

****

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

Previous Question Next Question
🔗

Similar Questions

From Pattern Printing in C · C programming

View All
WhatsApp