Answer:
Average
Explanation:
The best option for this example is to use the function average because we can to know the average of people in those five years, this function will sum all the people and then will divide by the years, in this case 5 years, for example =average(23+12+33+26+19)/5 this is equal to 23, median and mode only return the number most repeated in a range, and min return the less value in a range.
This question is incomplete. The complete question, answer & explanation for this question is given in the attachment below.
Answer:
The Answer for the given question is
First is return(average ) statement is not used in the last line in function average .
second not included the parenthesis in adding the value1 + value2 + value3 so include (value1 + value2 + value3 )
Third is not type casting the value so type cast the value by modify that statement
average = float(value1 + value2 + value3 )/ 3;
Explanation:
In the given code the return type is float that means function should return float value.So adding the statement in the last line return(average ) here all the parameters are of int type but "average" is float type and when an int is divided by int, it will return int value. So we have to type cast either denominator or numerator.
average = float(value1 + value2 + value3 )/ 3;
To define any function definition it must follow the proper syntax of function definition
The syntax is :
Returntype functionname(datatype parameter1,datatype parameter 2)
{
//statement
}
For example
int mux(int a,int b)
{
int c;
c=a*b;
return(c);
}
In this the returntype is integer thats why it return integer value c. If return type is void it will not return any value .
So the correct code is
float average(int value1, int value2, int value3)
{
float average;
average = float(value1 + value2 + value3 )/ 3;
return(average);
}
D. Writing the methods of the classes
Social Media. ...
Harassment and Discrimination. ...
Health and Safety. ...
Technology/Privacy
Disability. ...
Equal Pay. ...
Pregnancy. ...
Race/ Color. ...
Religion. ...