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.
Explanation & Answer
i can do your work what you will pay?????
Review
Review
24/7 Homework Help
Stuck on a homework question? Our verified tutors can answer all questions, from basic math to advanced rocket science!
Similar Content
Related Tags
Shattered - Inside Hillary Clintons Doomed Campaign
by Amie Parnes and Jonathan Allen
Milkweed
by Jerry Spinelli
100 Side Hustles
by Chris Guillebeau
The Grapes of Wrath
by John Steinbeck
Pride and Prejudice
by Jane Austen
I Cant Make This Up - Life Lessons
by Kevin Hart
The Secret Garden
by Frances Hodgson Burnett
Treasure Island
by Robert Louis
12 Rules for Life
by Jordan Peterson