1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Airida [17]
3 years ago
10

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 × 5 array, where each row represents a different monkey and each column represents a different day of the week. The program should first have the user input the data for each monkey. Then it should create a report that includes the following information: • 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.
Engineering
1 answer:
Kryger [21]3 years ago
6 0

Answer:

#include<iostream>

using namespace std;

int main()

{

  double data[3][5],avg,least,most,total;

  int leastNum,mostNum;

  for(int i=0;i<3;i++)

  {

      cout<<"Enter quantity of food for monkey "<<i+1<<":\n";

      for(int j=0;j<5;j++)

      {

          cout<<"Day "<<j+1<<": ";

          cin>>data[i][j];

      }

  }

  least = data[0][0];

  most = data[0][0];

  for(int i = 0;i<3;i++)

  {

      for(int j = 0;j<5;j++)

      {

          total+=data[i][j];

          if(data[i][j]>most)

          {

              most=data[i][j];

              mostNum=i+1;    

          }

          if(data[i][j]<least)

          {

              least=data[i][j];

              leastNum=i+1;

             

          }

      }

  }

  avg=total/5.0;

  cout<<"Average food eaten in a day by all the 3 monkeys: "<<avg<<endl;

  cout<<"Most amount of food eaten in a day: "<<most<<" by monkey: "<<mostNum<<endl;

  cout<<"Least amount of food eaten in a day: "<<least<<" by monkey: "<<leastNum<<endl;

  return 0;

}

You might be interested in
A farmer has 12 hectares of land on which he grows corn, wheat, and soybeans. It costs $4500 per hectare to grow corn, $6000 to
maw [93]

The number of hectares of each crop he should plant are; 250 hectares of Corn, 500 hectares of Wheat and 450 hectares of soybeans

<h3>How to solve algebra word problem?</h3>

He grows corn, wheat and soya beans on the farm of 1200 hectares. Thus;

C + W + S = 12   ----(1)

It costs $45 per hectare to grow corn, $60 to grow wheat, and $50 to grow soybeans. Thus;

45C + 60W + 50S = 63750  -----(2)

He will grow twice as many hectares of wheat as corn. Thus;

W = 2C    ------(3)

Put 2C for W in eq 1 and eq 2 to get;

C + 2C + S = 1200

3C + S = 1200     -----(4)

45C + 60(2C) + 50S = 63750

45C + 120C + 50S = 63750

165C + 50S = 63750    ------(5)

Solving eq 4 and 5 simultaneosly gives;

C = 250 and W = 500

Thus; S = 1200 - 3(250)

S = 450

Read more about algebra word problems at; brainly.com/question/13818690

5 0
2 years ago
Takt time is the rate at which a factory must produce to satisfy the customer's demand. a)- True b)- False
laila [671]

Answer: a)True

Explanation: Takt time is defined as the average time difference between  the production of the two consecutive unit of goods by the manufacturer and this rate is matched with the demand of the customer. This is the time which is calculated to find the acceptable time for which the goods unit must be produced  by the factory to meet the needs of the customer. Therefore , the statement is true that takt time is the rate at which a factory must produce to satisfy the customer's demand.

6 0
3 years ago
What is the primary damage control telephone circuit for
user100 [1]

Answer:

hsyghcjqg9ug9duyssatayfjzurldh

6 0
2 years ago
What is the perimeter of 14-7 and 3-4
Goshia [24]

Answer:

If you mean two sides are 7 and two sides are 14 then you'd have 42

and for the second you'd have 14

Explanation:

7 + 7 = 14, 14 + 14 = 28, 14 + 28 = 42

3 + 3 = 6, 4 + 4 = 8, 8 + 6 = 14

5 0
3 years ago
Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...
leva [86]

Answer: Pi= 4 - 4/3 + 4/5 - 4/7 + 4/9 ...

Explanation:

Is the same as the example,

If Π/4 = 1 - 1/3 + 1/5 - 1/7 + 1/9 ...

Then

(Π/4 )*4= 4*(1 - 1/3 + 1/5 - 1/7 + 1/9 ...)

Π =4 - 4/3 + 4/5 - 4/7 + 4/9 ...

The way to write this is

Sum(from n=0 to n=inf) of (-1)^n 4/(2n+1)

(photo)

6 0
3 years ago
Other questions:
  • A turbine produces shaft power from a gas that enters the turbine with a (static) temperature of 628 K, a velocity of 143 m/s an
    7·1 answer
  • You read a research study that concludes that the higher a student's self-esteem, the better he performs in school. This sort of
    5·1 answer
  • In order to protect yourself if you have a dispute with another drivers insurance company you should:
    9·1 answer
  • Suppose you are implementing a relational employee database, where the database is a list of tuples formed by the names, the pho
    14·1 answer
  • What is the advantage of Sensabot over human inspectors?
    12·1 answer
  • All of the following are categories for clutch covers except
    11·1 answer
  • Let CFG G be the following grammar.
    7·2 answers
  • The phase sequence of a 3-phase system for which VAN = 120 /90o V and VBN = 120 /210o V is:_______
    11·1 answer
  • QUESTION:
    13·1 answer
  • I want to know if anyone else know how to tell apart real leather from fake leather?!?!
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!