Print Star pattern program in C square Heart number

Star pattern program in C

Here we learn about the Print square and number star pattern program in c using the character data type. In another word, we input the character and Get output in Strict Format.

Thank you for reading this post, don't forget to subscribe!

The hollow pattern is here (Learn)

Heart pattern program in C

#include <stdio.h>

int main()
{
char shape[20][30]={
"...AAAAAAA........AAAAAA",
"..AAAAAAAAA......AAAAAAAA",
".AAAAAAAAAAA....AAAAAAAAAA",
"AAAAAAAAAAAAA..AAAAAAAAAAAA",
"AAAAAAAAAAAAAAAAAAAAAAAAAAAA",
"BBBBBBBBBBBBBBBBBBBBBBBBBBBB",
"BBBBBBBBBBBBBBBBBBBBBBBBBBB",
".BBBBBBBBBBBBBBBBBBBBBBBBB",
"..BBBBBBBBBBBBBBBBBBBBBBB",
"...BBBBBBBBBBBBBBBBBBBBB",
"....BBBBBBBBBBBBBBBBBBB",
".....BBBBBBBBBBBBBBBBB",
"......BBBBBBBBBBBBBBB",
".......BBBBBBBBBBBBB",
"........BBBBBBBBBBB",
".........BBBBBBBBB",
"..........BBBBBBB",
"...........BBBBB",
"............BBB",
".............B"};

int i,j;
for(i=0;i<20;i++){
for(j=0;j<30;j++){

if(shape[i][j]=='A' || shape[i][j]=='B')
printf("*");
else
printf(" ");

}
printf("\n");
}

return 0;
}


C program to print patterns of numbers and stars

 print square number star pattern program in c 
Star pattern program in c

Heart pattern using Character Data Type

May this program will help you in better understanding pattern programs using Character Data type in C.

END

Heart Pattern in C

Saurabh Nissa

This is SaurabhNissa, Owner of Thesmolt.com I'm Graduated from Magadh University in 2019 with 75%. Currently, I'm working on my Personal educational website for teaching Programming language free of Coast, and want to provide a Full setup for Specially BCA student