
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

#include <stdio.h> int main(int argc, char **argv) { int row, column, i = 0; int userRows; printf("Enter the number of rows: "); scanf("%d", &userRows); // For each row for (row = 1; row <= userRows; row++, i = 0) { // For each column print spaces until first , then print * for(column = 1; column <= userRows - row; column++) { printf(" "); } while (i != 2 * row - 1) { printf(""); i++; } printf("\n"); } return 0; }