Question: 12. Write a program to store an input list of five numbers in an array named list and display the largest element in the array

12. Write a program to store an input list of five numbers in an array named list and display the largest element in the array using a function named max_value. The function max_value will use the array and its size as input parameters and then returns the largest element in the array. Sample output: Enter five numbers: 78 80 99 45 59 Element in array list [0] = 78 Element in array list [1] = 80 Element in array list [2] = 99 Element in array list [3] = 45 Element in array list [4] = 59 Largest element in array list: 99
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
