Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Principles Programming And Performance

Authors: Patrick O'Neil

1st Edition

1558603921, 978-1558603929

More Books

Students also viewed these Databases questions

Question

Write formal and informal proposals.

Answered: 1 week ago

Question

Describe the components of a formal report.

Answered: 1 week ago

Question

Write formal and informal reports.

Answered: 1 week ago