PHP Code:
#include <iostream>
#include <iomanip>
using namespace std;

int main()
{
 
double totalAverage[6];
 
int monkeyday;
 
 
 const 
int NUM_MONKEYS 3;
 const 
int NUM_DAYS 7;    
 
double average [NUM_MONKEYS][NUM_DAYS];
 
double highest=0lowest=30000;
 
 
cout << "Enter the amount of food in pounds eaten by the referred monkey.\n";
 
 for (
monkey 0monkey NUM_MONKEYSmonkey++)
 {
     for (
day 0day NUM_DAYSday++)
     {
     
cout << "Monkey " << (monkey 1) << ", "
     
<< "Day " << (day 1) << ": ";
     
cin >> average [monkey][day];
     while ((
average [monkey][day] < 0))
     {
     
cout << "Please enter positive values.\n";
     
cin >> average [monkey][day]; 
      }
        }
cout << endl;
        }
[
B]cout << "Average of the three monkeys per day from day 1 to day 7\n";
totalAverage[0]=0;
for (
day =0dayNUM_DAYSday++)

{
    for (
monkey 0monkey NUM_MONKEYSmonkey++)
{    
totalAverage[day] += average[monkey][day];}
    
cout << "Average: " << totalAverage[day]/NUM_MONKEYS << endl;
}[/
B]
//


    
for (monkey 0monkey NUM_MONKEYSmonkey++)
{
    for (
day =0dayNUM_DAYSday++)
    {
        if ((
average [monkey][day]) > highest)       //ESTE ESTA BIEN SEGUN YO ASI
        
highest average [monkey][day];
    }
//
}
     for (
monkey 0monkey NUM_MONKEYSmonkey++)
{
    for (
day =0dayNUM_DAYSday++)
    {
    if ((
average [monkey][day]) < lowest )                    // PERO ESTE ES EL DEL LOWEST Y PUES NOSE :S 
    
lowest average [monkey][day];
}
//
}
  
cout << fixed << showpoint << setprecision (2);    // PARA QUE SEA DECIMAL POR EL DOUBLE

cout << "The highest amount is: " << highest << endl;
cout << "The lowest amount is: " << lowest << endl;    
    
      
         
system ("PAUSE");
         return 
0;


WHEN YOU RUN and enter all the values, the part where the loop that say: cout << "Average of the three monkeys per day from day 1 to day 7\n"; does the average correct but on the third or fifth goes with power e