Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

create a C + + to address the following program: a local zoo wants to keep track of how many pounds of food each of

create a C++ to address the following program:
a local zoo wants to keep track of how many pounds of food each of its two monkeys eats each day during a typical week. Write a C++ program that stores this information in a two-dimensional array of size 2-by-7,2 rows and 7 columns. Each row represents a different monkey, and each column represents a different day of the week. The program should have the following functions:
A function to ask the user to input and return the pounds of food that each Monkey eats per day. The number of pounds must be between 0 and 20, inclusive, pounds. If the user enters any other number of pounds, the function will show a message as an invalid entry, and it will ask the user to enter another number. The function only returns a float or double number of pounds.
A function to save the pounds of food that each Monkey eats per day for seven days. The seven days of pounds of food is saved in an array.
A function to prompt the data in an array.
A function to collect the seven days of pounds of food ate by each Monkey. Basically, it saves in a 2-by-7 array that amounts to pounds that Monkey 1 and Monkey 2 ate in the seven days.
A function that calculates and returns the average amount of food eaten per Monkey in the seven days.
A function to prompt a result as:
-------- MONKEY 1 DIET CHART --------
Food eaten in one week ____,____,____,____,____,____,____
Average food in one week _____
-------- MONKEY 2 DIET CHART --------
Food eaten in one week ____,____,____,____,____,____,____
Average food in one week _____

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

The Database Relational Model A Retrospective Review And Analysis

Authors: C. J. Date

1st Edition

0201612941, 978-0201612943

More Books

Students also viewed these Databases questions