Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a program that asks the user to type an animal name, as seen below. The program must then show the sound the animal makes.
Write a program that asks the user to type an animal name, as seen below. The program must then show the sound the animal makes. The program must then ask for another animal name, and keep running until the user enters "quit". If the animal name is not recognised, the program must display "Unrecognised animal".The following animals and sounds must be implemented:
Animal Soundcat meowcow moodog woofsheep baaYour output should be presented as follows user input appears in bold in order to help you determine the input from output you are not required to make the text bold:Please type an animal:catmeowPlease type an animal:bananaUnrecognised animalPlease type an animal:cowmooPlease type an animal:quitYou will need to write a complete program to do this.Please note: the quiz system will not accept gets. You should use scanf to read the input from the user.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started