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

Function main

Examples/Modules/Chapter 11/Ex11_08/Ex11_08.cpp:18–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

hypotenuseFunction · 0.85
squareFunction · 0.50

Tested by

no test coverage detected