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