MCPcopy Create free account
hub / github.com/Apress/beginning-cpp20 / computeValue

Function computeValue

Examples/NoModules/Chapter 16/Ex16_07A/Ex16_07A.cpp:40–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40double computeValue(size_t x)
41{
42 if (x < 100)
43 return std::sqrt(x); // Return the square root of the input argument
44 else
45 throw Trouble{ "The trouble with trouble is, it starts out as fun!" };
46}
47

Callers 1

computeValuesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected