Question: 13.4 Program: Minimum Value Write a function template FindSmallest() that returns the smallest value (minimum) in an array of numbers (ints, doubles, floats, unsigned ints,

13.4 Program: Minimum Value

Write a function template FindSmallest() that returns the smallest value (minimum) in an array of numbers (ints, doubles, floats, unsigned ints, etc.) that is passed to it. You will also pass a value that holds the number of values in the array being based.

template T FindSmallest(T * a, int n) 

Write a test program that uses the function template above on an array of ints and an array of doubles; you may just use arrays declared with initializers.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!