Observe the following statements, which represents the tasks performed by a function called main:
• Declare a floating-point array, called Covid19, of a size of 10.
• Perform a call to a function named getTemp, as described in part A
• Output the result from the call to a function named calcAvgTemp, as described in part B You are required to implement the C++ instructions for main. (Note: This function will have no return value).
#include <iostream>
void getTemp(float *);
float calcAvgTemp(float *);
int main() {
float Covid19[10];
getTemp(Covid19);
std::cout << calcAvgTemp(Covid19) << std::endl;
return 0;
}
Comments
Leave a comment