//declares a new data type
//which is a 2 dimensional array of floats
const int NumofMonkeys =3;
const int NumofDays= 7;
//creat a new data type 2D array of doubles
typedef double MealType[NumofMonkeys][NumofDays];
void getMeal(MealType, int &, int &); //get the meal into the array
void printMeal(MealType, int, int); //print data as a table
int main ()
{
int rows,
cols;
MealType mealTable;
getMeal(mealTable, rows, cols);
printMeal(mealTable,rows,cols);
system("pause");
return 0;
}
void getMeal(MealType table, int &NumofMonkeys, int &NumofDays)
{ for (int row =0; row<NumofMonkeys; row++)
{for (int col =0; col<NumofDays; col++)
cout<<"Please Enter Number of monkeys"<<endl;
cout<<"Please Enter number of the Day from 1to7:"<<endl;
cin>>MealType[NumofMonkeys][NumofDays];
}
}