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

Function main

Examples/NoModules/Appendix A/ExA_06/ExA_06.cpp:8–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6double power(double x, int n); // Redundant declaration (harmless)
7
8int main()
9{
10 for (int i{ -3 }; i <= 3; ++i) // Calculate powers of 8 from -3 to +3
11 std::cout << std::format("{:10}\n", power(8.0, i));
12 std::cout << std::endl;
13}
14
15double power(double x, int n) // A first definition
16{

Callers

nothing calls this directly

Calls 1

powerFunction · 0.70

Tested by

no test coverage detected