Question: in c++ please Define 2 functions that work with c-style arrays of integers. The first function should be called find Min and it should pass
in c++ please
Define 2 functions that work with c-style arrays of integers. The first function should be called find Min and it should pass in an array of integers. The function should return the value of the smallest integer within the array. The second function should be called scale and it should pass in an array of integers and a single integer value. The scale function should reduce all values in the array by the single integer value passed in. For example, if the array passed in to scale originally stores the values 1 2 3 4 5 6 and the integer passed in is 1 then after the function call the array would store the values 0 1 2 3 4 5 In the main function: Read in integer values from cin and store them in the array until the user enters a -1. Output the values in the array, each value in the array separated by a space. Call the findMin function to get the smallest value in the array. Call the scale function, passing in the array and the value returned by findMin. Output the values in the array again showing that the array has been changed appropriately. Do not prompt the user for input. Just read the values in to the array. You may assume there will never be more than 50 integers read in
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
