Write a program that prints the following rectangle shape with a diamond hole inside
1. You may choose the character symbol which you would like to display (e.g., #, $, %, ^, etc.). The
above example is using an asterisk symbol (*).
2. The diamond hole should evenly fill the rectangle. Its height and width should be the same as the
rectangle (determined by the count of space and symbol at the corners) and each side should have
equal number of asterisks (or spaces).
The program will ask the user to enter an odd number that is greater than four (4). This number
represents the height (or width) of the rectangle.
4. If the user gives a valid value, display the rectangle, then ask the user again for another attempt.
Do this until the user decided to quit by means of entering zero.
5. If the user entered an invalid value (i.e., even number or less than 4), ask the user again to enter
another value. Do not stop until the user entered a valid value or the user decided to quit by
means of entering zero.


0 comments