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

Function main

Examples/NoModules/Chapter 11/Ex11_08/Ex11_08.cpp:15–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13}
14
15int main()
16{
17 std::cout << "math::sqrt2 has the value " << math::sqrt2 << std::endl;
18 std::cout << "This should be 0: " << (math::sqrt2 - std::numbers::sqrt2) << std::endl;
19 std::cout << "This should be 2: " << math::square(math::sqrt2) << std::endl;
20 std::cout << "This should be 5: " << my_hypot(3, 4) << std::endl;
21}

Callers

nothing calls this directly

Calls 2

my_hypotFunction · 0.85
squareFunction · 0.70

Tested by

no test coverage detected