Star Pattern 8-Hallow rhombus pattern using stars in C programming
In this program, we will see the Hallow rhombus pattern using stars in C programming language. Please look into the program.
********** **** **** *** *** ** ** * * ** ** *** *** **** **** **********
The C program for Cross pattern is as follows:
#include <stdio.h> int main() { int a, b, c; for(a=1;a<=5;a++) { for(b=1;b<=6-a;b++) { printf("*"); } for(c=1;c<a;c++) { printf(" "); } for(b=1;b<=6-a;b++) { printf("*"); } printf("n"); } for(a=2;a<=5;a++) { for(b=1;b<=a;b++) { printf("*"); } for(c=1;c<=5-a;c++) { printf(" "); } for(b=1;b<=a;b++) { printf("*"); } printf("n"); } getch(); return 0; }