C Program to Generate Specific Formats

How to write a C Program to generate specific formats in C Programming Language ?

Solution:

#include<stdio.h>
void main()
{
int r, s, n;
printf("\nEnter the Value of n : ");
scanf("%d", &n);
for(r = 1; r <= n; r++)
{
for(s = 1; s <= r; s++)
printf("*");
printf("\n");
}
}


Learn More :