Using C++ complete the following program Monkey BusinessA local zoo wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 × 7 array, where each row represents a different monkey and each column represents a different day of the week. The monkeys are represented by integers 1, 2, and 3; the weekdays are "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday". The program should first prompt the user to input the data for each monkey, starting with "Sunday" for monkey #1, then monkeys #2 and #3, followed by "Monday" for monkey #1, then monkeys #2 and #3 and so on, through "Saturday". The program then creates a report that includes the following information, each properly labeled (see below):   Average amount of food eaten per day by the whole family of monkeys.   The least amount of food eaten during the week by any one monkey.   The greatest amount of food eaten during the week by any one monkey.     Input Validation: Do not accept negative numbers for pounds of food eaten. When a negative value is entered, the program outputs "invalid (negative) food quantity -- re-enter" and attempts to reread the value.   NOTE: Decimal values should be displayed using default precision, i.e. do not specify precision. The standard output must look like below Enter·the·food·eaten·by·monkey·#1·on·Sunday:·8↵ Enter·the·food·eaten·by·monkey·#2·on·Sunday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Sunday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Monday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Monday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Monday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Tuesday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Tuesday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Tuesday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Wednesday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Wednesday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Wednesday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Thursday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Thursday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Thursday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Friday:·3↵ Enter·the·food·eaten·by·monkey·#2·on·Friday:·3↵ Enter·the·food·eaten·by·monkey·#3·on·Friday:·5↵ Enter·the·food·eaten·by·monkey·#1·on·Saturday:·2↵ Enter·the·food·eaten·by·monkey·#2·on·Saturday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Saturday:·5↵ Average·food·consumed·daily:·13.7143↵ The·least·daily·food·consumed·was·by·Monkey·#1·on·Saturday.↵ The·most·daily·food·consumed·was·by·Monkey·#1·on·Sunday.↵

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter8: Arrays And Strings
Section: Chapter Questions
Problem 11PE
icon
Related questions
Question

Using C++ complete the following program

Monkey Business

A local zoo wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 × 7 array, where each row represents a different monkey and each column represents a different day of the week. The monkeys are represented by integers 1, 2, and 3; the weekdays are "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday". The program should first prompt the user to input the data for each monkey, starting with "Sunday" for monkey #1, then monkeys #2 and #3, followed by "Monday" for monkey #1, then monkeys #2 and #3 and so on, through "Saturday". The program then creates a report that includes the following information, each properly labeled (see below):



 

    • Average amount of food eaten per day by the whole family of monkeys.

 

    • The least amount of food eaten during the week by any one monkey.

 

    • The greatest amount of food eaten during the week by any one monkey.

 

 


Input Validation: Do not accept negative numbers for pounds of food eaten. When a negative value is entered, the program outputs "invalid (negative) food quantity -- re-enter" and attempts to reread the value.

 


NOTE: Decimal values should be displayed using default precision, i.e. do not specify precision.

The standard output must look like below

Enter·the·food·eaten·by·monkey·#1·on·Sunday:·8↵ Enter·the·food·eaten·by·monkey·#2·on·Sunday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Sunday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Monday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Monday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Monday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Tuesday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Tuesday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Tuesday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Wednesday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Wednesday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Wednesday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Thursday:·4↵ Enter·the·food·eaten·by·monkey·#2·on·Thursday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Thursday:·6↵ Enter·the·food·eaten·by·monkey·#1·on·Friday:·3↵ Enter·the·food·eaten·by·monkey·#2·on·Friday:·3↵ Enter·the·food·eaten·by·monkey·#3·on·Friday:·5↵ Enter·the·food·eaten·by·monkey·#1·on·Saturday:·2↵ Enter·the·food·eaten·by·monkey·#2·on·Saturday:·4↵ Enter·the·food·eaten·by·monkey·#3·on·Saturday:·5↵ Average·food·consumed·daily:·13.7143↵ The·least·daily·food·consumed·was·by·Monkey·#1·on·Saturday.↵ The·most·daily·food·consumed·was·by·Monkey·#1·on·Sunday.↵

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage