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

Function getLowest

Exercises/NoModules/Chapter 08/Soln8_06.cpp:139–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

mainFunction · 0.70

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected