Home »
Code Examples »
C Code Examples
C - Print 180 Degree Rotation of Simple Half Left Pyramid Code Example
The code for Print 180 Degree Rotation of Simple Half Left Pyramid
#include <stdio.h>
int main() {
int rowsNumber = 10;
for (int i = rowsNumber; i > 0; i--) {
for (int j = 0; j <= rowsNumber; j++) {
if (j >= i) {
printf("*");
} else {
printf(" ");
}
}
printf("\n");
}
return 0;
}
/*
Output:
*
**
***
****
*****
******
*******
********
*********
**********
*/
Code by IncludeHelp,
on August 14, 2022 21:09