#include <stdio.h>
int main() {
int i,j, rows;
printf("Enter the number of rows\n"); /* printing top semi circular shapes of heart */
for(i = rows/2; i <= rows; i+=2){
/* Printing Spaces */
for(j = 1; j < rows-i; j+=2) {
}
/* printing stars for left semi circle */
for(j = 1; j <= i; j++){
}
/* Printing Spaces */
for(j = 1; j <= rows-i; j++){
}
/* printing stars for right semi circle */
for(j = 1; j <= i; j++){
}
/* move to next row */
}
/* printing inverted start pyramid */
for(i = rows; i >= 1; i--){
for(j = i; j < rows; j++){
}
for(j = 1; j <= (i*2)-1; j++){
}
/* move to next row */
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+ICAKICAgCmludCBtYWluKCkgeyAgCiAgICBpbnQgaSxqLCByb3dzOwogICAgIAogICAgcHJpbnRmKCJFbnRlciB0aGUgbnVtYmVyIG9mIHJvd3NcbiIpOwogICAgc2NhbmYoIiVkIiwgJnJvd3MpOyAgCiAgICAvKiBwcmludGluZyB0b3Agc2VtaSBjaXJjdWxhciBzaGFwZXMgb2YgaGVhcnQgKi8KICAgIGZvcihpID0gcm93cy8yOyBpIDw9IHJvd3M7IGkrPTIpeyAKICAgICAvKiBQcmludGluZyBTcGFjZXMgKi8KICAgICAgICBmb3IoaiA9IDE7IGogPCByb3dzLWk7IGorPTIpIHsgIAogICAgICAgICAgICBwcmludGYoIiAiKTsgIAogICAgICAgIH0KICAgICAgICAvKiBwcmludGluZyBzdGFycyBmb3IgbGVmdCBzZW1pIGNpcmNsZSAqLwogICAgICAgIGZvcihqID0gMTsgaiA8PSBpOyBqKyspeyAgCiAgICAgICAgICAgIHByaW50ZigiKiIpOyAgCiAgICAgICAgfSAgCiAgICAgICAgLyogUHJpbnRpbmcgU3BhY2VzICovCiAgICAgICAgZm9yKGogPSAxOyBqIDw9IHJvd3MtaTsgaisrKXsgIAogICAgICAgICAgICBwcmludGYoIiAiKTsgIAogICAgICAgIH0gIAogICAgICAgIC8qIHByaW50aW5nIHN0YXJzIGZvciByaWdodCBzZW1pIGNpcmNsZSAqLwogICAgICAgIGZvcihqID0gMTsgaiA8PSBpOyBqKyspeyAgCiAgICAgICAgICAgIHByaW50ZigiKiIpOyAgCiAgICAgICAgfSAgCiAgICAgICAgLyogbW92ZSB0byBuZXh0IHJvdyAqLwogICAgICAgIHByaW50ZigiXG4iKTsgIAogICAgfSAgCiAgICAgCiAgICAvKiBwcmludGluZyBpbnZlcnRlZCBzdGFydCBweXJhbWlkICovCiAgICBmb3IoaSA9IHJvd3M7IGkgPj0gMTsgaS0tKXsgIAogICAgICAgIGZvcihqID0gaTsgaiA8IHJvd3M7IGorKyl7ICAKICAgICAgICAgICAgcHJpbnRmKCIgIik7ICAKICAgICAgICB9ICAKICAgICAgICBmb3IoaiA9IDE7IGogPD0gKGkqMiktMTsgaisrKXsgIAogICAgICAgICAgICBwcmludGYoIioiKTsgIAogICAgICAgIH0gIAogICAgICAgIC8qIG1vdmUgdG8gbmV4dCByb3cgKi8KICAgICAgICBwcmludGYoIlxuIik7ICAKICAgIH0gIAogICAKICAgIHJldHVybiAwOyAgCn0gIAo=