Number Pattern 61-Rhombus pattern in C programming
Contents
hide
In this program, we will see the Rhombus pattern numbers in C programming language. Please look into the program.
1 2 2 3 3 4 4 3 3 2 2 1
The C program for Rhombus pattern is as follows:
#include<stdio.h> int main() { int a, b, c; for(a=1;a<=5;a++) { for(b=a;b<5;b++) { printf(" "); } for(c=1;c<(a*2);c++) { printf("%d",c); } printf("n"); } for(a=4;a>=1;a--) { for(b=5;b>a;b--) { printf(" "); } for(c=1;c<(a*2);c++) { printf("%d",c); } printf("n"); } getch(); return 0; }