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

Function getLowest

Exercises/Modules/Chapter 08/Soln8_06.cpp:140–149  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

138}
139
140void getLowest(const std::vector<unsigned>& sortedNumbers, unsigned(&lowest)[5])
141{
142 for (size_t i{}; i < std::size(lowest); ++i)
143 {
144 if (i < sortedNumbers.size())
145 lowest[i] = sortedNumbers[i];
146 else
147 lowest[i] = NOT_AVAILABLE;
148 }
149}
150
151double computeAverage(const std::vector<unsigned>& numbers)
152{

Callers 1

mainFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected