prog1

User Generated

znexwb17

Programming

Description

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.


User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

i can do your work what you will pay?????


Anonymous
Great study resource, helped me a lot.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4

Related Tags