Question: Could someone write this for me is c++? I can't seem to figure out the loops to display the arrays. This is everything so far:

Could someone write this for me is c++? I can't seem to figure out the loops to display the arrays.

Could someone write this for me is c++? I can't seem to

This is everything so far:

#include

using namespace std;

// Global constants

const int SIZE = 10; // The size of the array

// Function prototypes

void displayGreaterThan(int[], int);

void displaySmallerThan(int[], int);

void displayArrayContent(int[]);

void displayLargetValue(int[]);

void displaySmallestValue(int[]);

int main()

{

int number; // To hold a number.

// Define an array of integers.

int numbers[SIZE] = { 1, 23, 43, 54, 4, 34, 2, 5, 7, 9 };

// Get a number as input from the user.

cout

cin >> number;

cout

displayGreaterThan(numbers, number);

cout

return 0;

}

// ********************************************************

// The displayGreaterThan function accepts two arguments: *

// an integer array and a number n, and it displays all *

// of the numbers in the array that are greater than the *

// number n. *

// ********************************************************

void displayGreaterThan(int values[], int n)

{

cout

// Step through the array.

for (int i = 0; i

{

// Determine if a number is greater than n.

if (values[i] > n)

{

// If so, display the number.

cout

}

}

cout

}

Write a program that will have a predefined array and then asks the user to enter an integer value cal i number. Then write the following functions to display: All values larger than number found in the array. Here is the function prototype: . o void displayGreaterThan(int[], int); All values smaller than number found in the array. Here is the function's proioiype o void displaySmallerThan(intl[], int) o void displayArrayContent(int[D o void displayLargetValue(int[]): o void displaySmallestValue(intl]): All values in the array. Here is the function's prototype: .The largest value in the array. Here is the function's prototype: The smallest value in the array. Here is the function's prototype

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!