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 4-stroke Diesel engine with a displacement of Vd = 2.5x10^-3m^3 produces a mean effective pressure of 6.4 bar at the speed of
yKpoI14uk [10]

Answer:

The power developed by engine is 167.55 KW

Explanation:

Given that

V_d=2.5\times 10^{-3} m^3

Mean effective pressure = 6.4 bar

Speed = 2000 rpm

We know that power is the work done per second.

So

P=6.4\times 100\times 2.5\times 10^{-3}\times \dfrac{2\pi \times2000}{120}

We have to notice one point that we divide by 120 instead of 60, because it is a 4 cylinder engine.

P=167.55 KW

So the power developed by engine is 167.55 KW

4 0
3 years ago
Situation: Peter is designing a new hybrid car that functions on solar power. He is currently working on sketches of his design
givi [52]

Answer:

whats the question?

Explanation:

8 0
2 years ago
Who is web developer?????​<br>plez answer..
vredina [299]

Web developers design and create websites. They are responsible for the look of the site. They are also responsible for the site's technical aspects, such as its performance and capacity, which are measures of a website's speed and how much traffic the site can handle. In addition, web developers may create content for the site

8 0
3 years ago
Read 2 more answers
you have a permanent magnet whit remanent induction. than you cut a piec of that magnet. if you put that piece back into permane
ELEN [110]
Yes, it will. The induction will be the same as long as it’s put back together.
5 0
3 years ago
If you are unsure about holding a piece of wood to be drilled, then you should always use a
alisha [4.7K]
C I took construction class
4 0
3 years ago
Other questions:
  • System grounding on a power system means electrically connecting the __?__ of every wye-connected transformer or generator to ea
    12·1 answer
  • A simple ideal Rankine cycle with water as the working fluid operates between the pressure limits of 4 MPa in the boiler and 25
    14·2 answers
  • What are the four categories of engineering materials used in manufacturing?
    9·1 answer
  • What’s the difference between engineering stress and strain and true stress and strain
    6·2 answers
  • Modify the Rainfall Statistics program you wrote for Programming Challenge 2 of Chapter 7 . The program should display a list of
    15·1 answer
  • Consider the cascade of the three LTI systems having impulse responses: h-1(t) = e^-tu(t + 3) h_2(t) = rect((1 -1)/2) h_3(t) = d
    8·1 answer
  • A long bone is subjected to a torsion test. Assume that the inner diameter is 0.375 in. and the outer diameter is 1.25 in., both
    14·1 answer
  • 6.3.3 Marks on an exam in a statistics course are assumed to be normally distributed
    14·1 answer
  • What energy type is represented in the picture?
    6·2 answers
  • What did August Comte contribute to sociology including positivism
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!