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
1. What is the maximum value of the linear density in a crystalline solid (linear density defined as the fraction of the line le
insens350 [35]
Number three number three number three I’m not 100% sure though
4 0
3 years ago
If you are interested only in the temperature range of 20° to 40°C and the ADC has a 0 to 3V input range, design a signal condit
mario62 [17]

Explanation:

Temperature range → 0 to 80'c

respective voltage output → 0.2v to 0.5v

required temperature range 20'c to 40'c

Where T = 20'c respective voltage

\begin{aligned}v_{20} &=0.2+\frac{0.5-0.8}{80} \times 20 \\&=0.2+\frac{0.3}{80} \times 20 \\V_{20} &=0.275 v\end{aligned}

\begin{aligned}\text { when } T=40^{\circ} C & \text { . } \\v_{40} &=0.2+\frac{0.5-0.2}{80} \times 40 \\&=0.35 V\end{aligned}

Therefore, Sensor output changes from 0.275v to 0.35volts for the ADC the required i/p should cover the dynamic range of ADC (ie - 0v to 3v)

so we have to design a circuit which transfers input voltage 0.275volts - 0.35v to 0 - 3v

Therefore, the formula for the circuit will be

\begin{array}{l}v_{0}=\left(v_{i n}-0.275\right) G \\\sigma=\ldots \frac{3-0}{0.35-0.275}=3 / 0.075=40 \\v_{0}=\left(v_{i n}-0.275\right) 40\end{array}

The simplest circuit will be a op-amp

NOTE: Refer the figure attached

Vs is sensor output

Vr is the reference volt, Vr = 0.275v

\begin{aligned}v_{0}=& v_{s}-v_{v}\left(1+\frac{R_{2}}{R_{1}}\right) \\\Rightarrow & \frac{1+\frac{R_{2}}{R_{1}}}{2}=40 \\& \frac{R_{2}}{R_{1}}=39 \quad \Rightarrow\end{aligned}

choose R2, R1 such that it will maintain required  ratio

The output Vo can be connected to voltage buffer if you required better isolation.

3 0
3 years ago
To revise a monthly budget, changes in which categories might need to be addressed? Check all that apply.
GREYUIT [131]

Income

amount budgeted

expenses

5 0
3 years ago
When block C is in position xC = 0.8 m, its speed is 1.5 m/s to the right. Find the velocity of block A at this instant. Note th
Amanda [17]

Answer:

The answer is "2 m/s".

Explanation:

The triangle from of the right angle:

\to (x_c-0.8)+(1.5+y_4) +\sqrt{x_c^2 + 1.5^2}= constant

Differentiating the above equation:

\to V_c +V_A+ \frac{X_cV_c}{\sqrt{x_c^2 +1}}=0\\\\\to 1-V_A+ \frac{0.8 \times 1.5}{\sqrt{ 0.8^2+1.5}}=0\\\\

\to V_A=  \frac{1.2}{\sqrt{ 0.64+1.5}}+1\\\\

        = \frac{1.2}{ 1.46}+1\\\\= \frac{1.2+ 1.46}{ 1.46}\\\\ = \frac{2.66}{1.46}\\\\= 1.82 \ \frac{m}{s}\\\\= 2 \ \frac{m}{s}

3 0
2 years ago
A horizontal pipe has an abrupt expansion from D1 5 8 cm to D2 5 16 cm. The water velocity in the smaller section is 10 m/s and
anyanavicka [17]
  • Answer:  Explanation:  Application of the bernoulli's equation comes in from conservation of mass flow.  The cross sectional area of the two pipes are calculated. from A = πD²/4 The velocity of water from conservation of mass flow is also calculated ; V2 = Ac1V1/Ac2 The Loss coefficient is then calculated from KL = (1 - Ac1²/Ac2²)² Then the head Loss (hL) is calculated  The detailed calculated and appropriate steps is as shown in the attached files.

5 0
3 years ago
Other questions:
  • A curve with 0.3 m constant radius contains a bead that is moving on it such that its rotational velocity is 3t2 sec-1. If the b
    12·1 answer
  • What does basic levels of competence involves??​
    13·2 answers
  • In case of damaged prestressed concrete I girders which are used for restoring strength?
    9·1 answer
  • Two hemispherical shells of inner diameter 1m are joined together with 12 equally spaced bolts. If the interior pressure is rais
    15·1 answer
  • Considering the two tables below called Orders and OrderLines, how many rows would be returned by this SQL query? SELECT o.Order
    10·1 answer
  • Different Gauss quadrature formulae predict different values for the same integral a. True b. False
    11·1 answer
  • Which of the following describes what a manufacturing engineer does
    9·2 answers
  • What is a beam on a bridge? what does it do?
    6·1 answer
  • Somebody help me!! It’s due today
    9·1 answer
  • 8th grade safety test
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!