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

Function main

Examples/Modules/Chapter 11/Ex11_07/Ex11_07.cpp:6–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4import math;
5
6int main()
7{
8 const double values[]{ 10, 2, 1, 8, 3, 7, 4, 5, 6, 9 };
9 std::cout << "Arithmetic mean: " << math::averages::arithmetic_mean(values) << std::endl;
10 std::cout << "Geometric mean: " << math::averages::geometric_mean(values) << std::endl;
11 std::cout << "Root mean square: " << math::averages::rms(values) << std::endl;
12 std::cout << "Median: " << math::averages::median(values) << std::endl;
13}

Callers

nothing calls this directly

Calls 2

arithmetic_meanFunction · 0.70
geometric_meanFunction · 0.70

Tested by

no test coverage detected