I have typed this many ways into dev-c++ trying to figure out how to figure out the output but it always comes back with errors no matter what headers I have used and other things. Can anyone give me some ideas? I don't want the answer, just ideas on how to find it. Being given the answer won't help me learn how to solve future problems. The problem is:
Consider the following function:
int mystery (int x, double y, char ch)
{
int u;
if ('A' <= ch && ch <= 'R')
return (2 * x + static_cast<int> (y));
else
return (static_cast<int> (2 * y) - x);
}
what is the output of the following C++ statement?
cout << mystery (5, 4.3, 'B') << endl;