C Program to Print Half Star Pyramid

In this program, you'll learn to half star pyramid.



Source Code
#include <stdio.h>
#include <conio.h>
void main()
{
    int i,j;
    for (i=0; i<5; i++)
    {
        for (j=0; j<=i; j++)
        {
            printf("* ");
        }
        printf("\n");
    }
    getch ( );
}
Output
*
* *
* * *
* * * *
* * * * *