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

Function main

Examples/NoModules/Chapter 08/Ex8_13.cpp:16–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14double* normalize_range(double data[], size_t count);
15
16int main()
17{
18 double samples[] {
19 11.0, 23.0, 13.0, 4.0,
20 57.0, 36.0, 317.0, 88.0,
21 9.0, 100.0, 121.0, 12.0
22 };
23
24 const size_t count{std::size(samples)}; // Number of samples
25 show_data(samples, count, "Original Values"); // Output original values
26 normalize_range(samples, count); // Normalize the values
27 show_data(samples, count, "Normalized Values", 12); // Output normalized values
28}
29
30// Outputs an array of double values
31void show_data(const double data[], size_t count,

Callers

nothing calls this directly

Calls 2

show_dataFunction · 0.70
normalize_rangeFunction · 0.70

Tested by

no test coverage detected