#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 numbers in each row
for (int j = 0; j < rows - i; j++) {
printf("%d ", j + 1);
}
printf("\n");
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: