MODIFY THIS 20. In this exercise, you modify the highest number program from the
ID: 3817149 • Letter: M
Question
MODIFY THIS 20. In this exercise, you modify the highest number program from the chapter If necessary, create a new project named Modify This20 Project and save it in the Cpp8 Chap11 folder. Enter the C++ instructions shown earlier in Figure 11-27 into a new source file named Modify This20.cpp. Change the filename in the first comment to Modify This 20 cpp. Modify the program to also display the lowest number in the array. Use a value-returning function named getLowest. Save and then run the program. Test the program appropriately.Explanation / Answer
int getLowest(int numArray[],int numElements){
int lowest=numArray[0];
for(int sub=0;sub<numElements;sub++){
if (numArray[i] < lowest)
lowest= numArray[i] ;
}
return lowest;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.