Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Apress/beginning-cpp20
/ computeValue
Function
computeValue
Examples/NoModules/Chapter 16/Ex16_07B/Ex16_07B.cpp:32–38 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
30
}
31
32
double computeValue(size_t x)
33
{
34
if (x < 100)
35
return std::sqrt(x); // Return the square root of the input argument
36
else
37
throw Trouble{
"The trouble with trouble is, it starts out as fun!"
};
38
}
39
Callers
1
computeValues
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected