Find the Errors
Each of the following functions has errors. Locate as many errors as you can.
A) void total(int value1, value2, value3)
{
return value1 + value2 + value3;
}
B) double average(int value1, int value2, int value3)
{
double average;
average = value1 + value2 + value3 / 3;
}
C) void area(int length = 30, int width)
{
return length * width;
}
D) void getValue(int value&)
{
cout << "Enter a value: ";
cin >> value&;
}
E) // Overloaded functions
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;
}
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.