0
Returning Function values.
How do you pull the return value from a function using a function call.
1 Respuesta
+ 24
float average(int a, int b){
return a+b/2.0;
}
int main(){
float avg = average(3,7); // save in another variable
cout<<avg;
// or directly print the value
cout<<average(10,5);
}