C Program to print the Pattern - * ** *** ****


 

// Program by Akash Tripathi (@proakash256)  
/* To print the pattern :
   *
  **
 ***
****
*/
#include <stdio.h>
int main()
{
    int k = 3;
    for(int i = 1; i <= 4; i = i + 1)
    {
        for(int j = i; j <= k; j = j + 1)
            printf(" ");
        for(int j = 1; j <= i; j = j + 1)
            printf("*");
        printf("\n");
    }
    return 0;
}

Comments