The program should calculate the average of the values stored in the rates array. It then should display the average rate on the screen. Display the average with two decimal places. Complete the program using the for statement. Save and then run the program. Complete the program and also have it write the average output to an output file opened in append mode.
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
double rates[5][3] = {{3.4, 56.7, 8.99},
{11.23, 4.67, 85.4},
{34.6, 2.4, 9.0},
{6.3, 8.0, 4.1},
{4.0, 2.0, 3.5}};
system("pause");
return 0;
} //end of main function
Please guyss helpp.. last program of the class. Thank you.