Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Antipatterns Avoiding The Pitfalls Of Database Programming

Authors: Bill Karwin

1st Edition

1680508989, 978-1680508987

More Books

Students also viewed these Databases questions

Question

Design a health and safety policy.

Answered: 1 week ago