Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Visual Studio community C++ Part A- Create the pseudo code and then code, (Largest/Smallest Array Values) : Write a program that lets the user

Using Visual Studio community C++

Part A- Create the pseudo code and then code,

(Largest/Smallest Array Values) : Write a program that lets the user enter 10 values into an array. The program should then display the largest and smallest values stored in the array.

**Please do not use functions for this program. I just want to see the code - deal with arrays and for loops.

The program should input the numbers for the array from the user, display the entire array, and then display the largest number and the smallest number.

____________________________________________________________________________________

Part B , recreate what you did in part A, and this time use functions. You will need the following functions (I am showing the prototypes.):

void getUserInput(int [], int);

int findHigest(int[], int); //this function returns the highest value in the array

int findLowest(int[],int);//this function returns the lowest value in the array

void displayArray(int[], int);

Remember that passing an array has 3 important pieces:

1. prototype the function with parameters that indicate the type of array followed by square brackets and then have another parameter that will hold the array size. (as I've shown above)

2. call the function by naming the function and then passing it the name of the array and the size. ie, getUserInput(myArray, SIZE);

3. define the function with parameters that indicate the type of array, it's name, followed by square brackets and then have the 2nd parameter be the size. Here's an example:

void getUserInput(int numbers[], int sizeOfArray)

{

etc....

You must use functions in this program.

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

Relational Database Technology

Authors: Suad Alagic

1st Edition

354096276X, 978-3540962762

More Books

Students also viewed these Databases questions