#include <stdio.h>
  
int main()
{
    int rows = 5;
  
    // first loop to print all rows
    for (int i = 0; i < rows; i++) {
  
        // first inner loop to print the * in each row
        for (int j = 0; j < rows - i; j++) {
            printf("* ");
        }
        printf("\n");
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: