Question: Goal: Learn how to gather input, process it and display the results to the user. Assignment: The local zoo recently has had new arrivals in
Goal: Learn how to gather input, process it and display the results to the user.
Assignment: The local zoo recently has had new arrivals in its penguins, seals and polar bears enclosures. To avoid wasting food, the administration wants to know how much the monthly consumption will be
Write a program that calculates the food consumption for each enclosure. It should take the number of total animals in each enclosure as input. The user should be prompted with the message:
Enter the number of :
Each animal is fed the exact amount each day. Assume that the variables dailypenguinration, dailysealration and dailypolarbearration have been assigned these amounts.
The program should display, for each animal, the total monthly food consumption. Assume a month is always days. Use the following format:
The food consumed by penguins: kg
The food consumed by seals: kg
The food consumed by polar bears: kg
Note: round the total to the nearest whole number.
Sample Run
Enter the number of penguins:
Enter the number of seals:
Enter the number of polar bears:
The food consumed by penguins is kg
The food consumed by seals is kg
The food consumed by polar bears is kg
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
