I\'ve been given these set of instructions for the following corrected functions
ID: 3535020 • Letter: I
Question
I've been given these set of instructions for the following corrected functions. Help please!
Explain input, what the function does with the input, and return value
Output If there are cout statements within the function, then you can
use these for your output. If there are no cout statements then assume
some arguments and tell me what the return value will be based on the
input to the paramenters.
A : )
double average(int valuel, int value2, int value3)
{
double average;
average = (valuel + value2 + value3) / 3;
return average;
}
B : )
void getValue(int &value)
{
cout << "Enter a value: ";
cin >> value;
C : )
int getValue()
{
int inputValue;
cout « "Enter an integer: ";
cin >> inputValue;
return inputValue; }
double getValue()
{
double inputValue;
cout « "Enter a floating-point number: ";
cin » inputValue;
return inputValue; }
Explanation / Answer
please rate http://ideone.com/jq8X71
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.