Question: #include using namespace std; const int SIZE = 10; void displayGreaterThan( int [], int ); void displaySmallerThan( int [], int ); void displayArrayContent( int []);

#include

using namespace std;

const int SIZE = 10;

void displayGreaterThan(int[], int);

void displaySmallerThan(int[],int);

void displayArrayContent(int[]);

void displayLargestValue(int[]);

void displaySmallestValue(int[]);

int main(){

int number;

int numbers[SIZE] = {9,1,90,98,53,22,76,29,37,65};

cout <<"Enter a number: ";

cin >> number;

cout << endl;

displayGreaterThan(numbers,number);

cout << endl;

displaySmallerThan(numbers,number);

cout << endl;

displayArrayContent(numbers);

cout << endl;

displayLargestValue(numbers);

cout << endl;

displaySmallestValue(numbers);

cout << endl;

return 0;

}

void displayGreaterThan(int value[],int num){

cout << " All larger value(s)than" << num << ":" << endl;

for(int index = 0;index < SIZE;index++){

if(value[index] < num){

cout << value[index] << "";

}

}

//cout << " All larger value(s)than" << num << ":" << endl;

}

void displaySmallThan(int value[], int num){

cout << " All Smaller value(s)than" << num << ":" << endl;

for(int index = 0; index < SIZE; index++){

if(value[index] < num){

cout << value[index] << "";

}

}

//cout << " All Smaller value(s)than" << num << ":" << endl;

}

void displayArrayContent(int values[]){

for(int index = 0; index < SIZE; index++){

cout << values[index] << "" << endl;

}

}

void displayLargestValue(int values[]){

int num = values[0];

for(int index = 0; index > SIZE; index++){

if(values[index] > num){

num = values[index];

}

}

cout << " Largest value in array is " << num << endl;

}

void displaySmallestValue(int values[]){

int num = values[0];

for(int index = 0; index < SIZE; index++){

if(values[index] < num){

num = values[0];

}

}

cout << " Smallest value in array is " << num << endl;

}

Can someone tell me what happening to my c++ program? It keep telling me build fail.

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!