Skip to content
Home » C Programs » C Program to Print Reverse Pyramid Pattern of Numbers

C Program to Print Reverse Pyramid Pattern of Numbers

Basic c program to print reverse pyramid pattern of numbers for beginners. Using this program we can execute and print the inverted pyramid number pattern program.

Return Statement in C

A return statement marks the end of a function’s execution and hands control back to the calling function. The calling function continues execution at the place where the call was made. 

A return statement can give the caller function a value. When a return statement is used in the body of a function, the function’s execution is halted. A supplied value is returned to the function caller if it is specified. Using this return statement we have executed this c program to print reverse pyramid pattern of numbers.

Rows and Columns

A row in a table or spreadsheet is a horizontal line of data, whereas a column is a vertical line of cells in a chart, table, or spreadsheet. Rows run from left to right across the board. Columns, on the other hand, are oriented from top to bottom. 

C Program to Print Reverse Pyramid Pattern of Numbers

#include <stdio.h>
int main() {
int i, j, rows;
printf("Enter the rows");
scanf("%d", &rows);
for (i = rows; i >= 1; --i) {
for (j = 1; j <= i; ++j) {
printf("%d ", j);
}
printf("\n");
}
return 0;
}

Output:

Enter the rows5
1 2 3 4 5
1 2 3 4
1 2 3
1 2
1