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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started