Code:#include <stdio.h> #include <math.h> int main() { int n, i, j; double dist, dist2; printf("How big is your heart?\n"); scanf("%d", &n); for(i = 0; i < n; i++) { for(j = 0; j < 4*n+1; j++) { dist = sqrt(pow(i-n,2)+pow(j-n,2)); dist2 = sqrt(pow(i-n,2)+pow(j-3*n,2)); if(dist < n + 0.5 || dist2 < n + 0.5) printf("*");//logic for semicircles -- use distance formulas else printf(" ");//logic for sloping lines } printf("\n"); //newline } int numspaces = 1; int numstars = 4*n-1; for(i = 1; i <= 2*n; i++) { for(numspaces=1;numspaces<=i;numspaces++) printf(" "); for(numstars = 4*n-1;numstars>=i;numstars--) printf("*"); printf("\n"); } system("pause"); return 0; }