Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There will be two programs for C++ PROGRAM#1: Create the pseudo code and then code, debug and create the requisite submission files for Programming Challenge

There will be two programs for C++

PROGRAM#1:

Create the pseudo code and then code, debug and create the requisite submission files for Programming Challenge #1 (Largest/Smallest Array Values)

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.

PROGRAM #2:

Recreate what was made in program#1, and this time use functions. You will need the following functions (These are 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);

Use these 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.

Example:

void getUserInput(int numbers[], int sizeOfArray)

{

etc....

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions