Question: write a c program that does the following displays...
Write a C program that does the following:
• Displays a menu (similar to what you see in a Bank ATM machine) that prompts the
user to enter a single character S or D or Q and then prints a shape of Square,
Diamond (with selected height and selected symbol), or Quits if user entered Q.
Apart from these 2 other shapes, add a new shape of your choice for any related
• Program then prompts the user to enter a number and then prompts to enter a
symbol. The allowable range of numbers is [7, 17] which will be used as height of the
above shape and any symbol is acceptable.
• Your program should be case insensitive. Uppercase and lowercase inputs will be
considered correct! You must use if-else statements to make appropriate choices in
the menu. Can’t use switch statement here! Logic to draw the shape can be
implemented using any loop statements but you cannot use same loop statement
• After displaying the shapes, show the menu again automatically. Note: there will be
no other way to stop the program until user enters Q.
Hint: You may want to create separate functions for drawing each shape.
c) Re-do Part b of the last problem using switch-case statement for menu. Note: You must use switch-case statements to make appropriate choices in the menu. Can’t use if-else statement here