Question: in c++ Write a program that prompts the user and takes in 5 integers from the user and stores them in an array by using

in c++ Write a program that prompts the user and takes in 5 integers from the user and stores them in an array by using a loop in main. It then calls a function that takes in the array and returns the biggest number in the array (also using a loop).

Requirements

1) Must have an integer array of length 5

2) Must populate the integer array by using a for loop

3) Must have a function that takes in an integer array and returns an integer

4) Program must output the largest value to the screen by coutting the value the function returns in main

5) Must match the output of the examples below

output should be something like if they put in -1 2 3 4 5

enter 5 numbers the highest number is: 5 

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!