Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Arrays - Write a program in Java or C++ that prompts the user for any 10 integer values. Place these 10 values into

In C++

image text in transcribed

Arrays - Write a program in Java or C++ that prompts the user for any 10 integer values. Place these 10 values into an array Display a menu to the user that will let them choose from several different functions that operate on the array of values that they inputted. Functions: Display Num bers - write a function that passes in the array. Display the contents of the array on one line separated by spaces or commas Display Reversed Numbers - write a function that passes in the array. Display the contents of the array backwards (don't actually reverse the array, just display it in reverse order by looping backwards) Display Specific Value - write a function that passes in the array and an index location. Display the value at that location (assume the user begins counting at 1) Find Value - write a function that passes in the array and a value to search for Locate that value in the array and display the location back to the user (assume the user begins counting from 1). If the value is not not exist Insert Value - write a function that passes in the array, a location, and a value Overwrite the value at that location with the new one Check Bounds - write a function that passes in an upper and lower bound. Take in the user input and check to make sure it is within those bounds. Loop until they enter a valid input, then return that input. Use this function for menu input, and index location inputs 1. 2. 3. 4. in the array, state that it does 5. 6. Menu 1. 2. 3. 4. 5. 6. Display Num bers Display Reversed Numbers Display Value at Position Search for a Value Insert New Value Quit Repeat the program until the user decides to quit. Extra Credit - Add the following functions and menu options for 2 points of extra credit. 1. 2. Compute Sum - write a function that passes in the array. Add up all of the values in the array and return the sum (do not display the result in the function) Compute Average - write a function that passes in the array. Call the sum function and divide the result by the array's length to compute the average and retum it. 3. Maximum Value - write a function that passes in the array. Iterate through the array to find the largest value and return it

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_2

Step: 3

blur-text-image_3

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 Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions

Question

How do modern Dashboards differ from earlier implementations?

Answered: 1 week ago