/* This program asks the user for an odd integer bigger than or equal to 5, and then prints the pattern of a box with an X in it to the screen, made out of + signs. So if the user enters in 7, the output should be +++++++ ++ ++ + + + + + + + + + + + ++ ++ +++++++ The program is implemented using several functions. 3 different functions print out different sorts of lines in the picture: (1) the top and bottom lines are solid +'s, (2) the middle line contains 3 +'s, and (3) the other lines contain 4 +'s. There's also a function to print out blank spaces, as used in the lines of type (2), (3) above. */ #include void solid_line (int); void blank_space (int); void write_line (int, int); void mid_line (int); void main() { int side, row, count = 0; /* The following loop cycles until the user enters an odd integer >=5. The count variable is used to avoid an infinite loop. */ do { cout << "Enter an odd integer bigger than or equal to 5: "; cin >> side; count++; if (count>=10) break; } while ((side%2==0) || (side < 5)); cout << endl; solid_line(side); // top row; for (row=2; row <= (side - 1)/2; row++) write_line(row, side); mid_line(side); // conceptually, row is (side +1)/2, the middle row for (row=(side+3)/2; row