Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Assume that cheetahs weigh 71 pounds and penguins weigh 67 pounds. Given variables numCheetahs and numPenguins that are read from input, compute the average weight

Assume that cheetahs weigh 71 pounds and penguins weigh 67 pounds. Given variables numCheetahs and numPenguins that are read from input, compute the average weight and assign averageWeight with the result.

Ex: If the input is 8 14, then the output is:

Average weight: 68

(IN C++)

image text in transcribed

Jump to level 1 Assume that cheetahs weigh 71 pounds and penguins weigh 67 pounds. Given variables numCheetahs and numPenguins that are read from input, compute the average weight and assign averageWeight with the result. Ex: If the input is 814 , then the output is: Average weight: 68 averageWeight is the sum of all the weights divided by the number of animals. Thus, averageWeight is the sum of (numCheetahs * cheetahWeight) and (numPenguins * penguinWeight) divided by (numCheetahs + numPenguins). Ex: If the input is 814 , then ((871)+(1467))/22 yields 68. Not all tests passed. 1: Compare output Output differs. See highlights below

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

More Books

Students also viewed these Databases questions

Question

Explain the nature of human resource management.

Answered: 1 week ago

Question

Write a note on Quality circles.

Answered: 1 week ago

Question

Describe how to measure the quality of work life.

Answered: 1 week ago

Question

6. Describe why communication is vital to everyone

Answered: 1 week ago