Number Pattern 56-Rectangle pattern in C programming
Contents
hide
In this program, we will see the Rectangle pattern numbers in C programming language. Please look into the program.
*000*000* 0*00*00*0 00*0*0*00 000***000
The C program for Pyramid pattern is as follows:
#include <stdio.h> int main() { int a,b,c; for(a=1;a<=4;a++) { for(b=1;b<=9;b++) { if(b==a || b==5 || 10-b==a) printf("*"); else printf("0"); } printf("n"); } getch(); return 0; }