Quiz 2 – The smallest number

--Originally published at Programming in C++

This was the second quiz of the partial. For this we had to use functions, arrays, and vector.

quiz2We had 2 vectors with 4 numbers with decimals, and a vector of size 8 and also with decimals. The first functions is for the vectors, and it is simply dine with several ifs. The second one is for the arrays and for this i used a for.

Note: in both cases I assumed the first number given was the smallest one and then compare that one with the rest of the numbers in the vectors or array.

quiz2m