Please include comments in your code. This is an entry level class so it can\'t
ID: 3621966 • Letter: P
Question
Please include comments in your code. This is an entry level class so it can't be to difficult.1. The Array is read in to the Array(s) by function IN_TMP(), pass the array variable by address to the function
2. The values are output by function OUT_TMP(), pass the array variable by address to the function
3. Create a separate function AVG_TMP() that will return the average temperatures of the week (will be called twice once for high and once for low) to the main() function to be printed out, [you will need to pass the array variables to the function]
Explanation / Answer
Dear,
Here is the code in DEV C++
//Header file section
#include < iostream .h>
#include < stdlib.h >
//function definitions
void IN_TMP(int *temp,int size)
{
for(int i=0;icin>>temp[i];
}
void OUT_TMP(int *temp,int size)
{
cout<<"Temperatures are:"<for(int i=0;icout<//function to input temperatures
IN_TMP(temperatures,7);
//function call to out put temperatures
OUT_TMP(temperatures,7);
double avg=AVG_TMP(temperatures,7);
cout<<"Average temperature is:"<system("pause");
}//end main
Hope this will help you