Wtite a C program to print the flowing type of pattern?


Program:


#include<stdio.h>
#include<conio.h>
void main()
{
    int n, i, j;
    printf("Enter number of terms to print the pattern: ");
    scanf("%d",&n);
    for(i=1; i<=n; i++)
    {
        for(j=1; j<=i; j++)
        {
            printf("*");
        }

            printf("\n");
    }

    getch();
}

Output:



Comments

Popular posts from this blog

Larch Soft Pvt. Ltd. - Best Website & Hosting Provider