
Respuesta :
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;
}