Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C++ PROGRAMMING PROBLEM 1 (a) Modify the int findMax (int[]) function in Program 7.6 of Bronson text to additionally find the minimum. As such develop

C++
image text in transcribed
PROGRAMMING PROBLEM 1 (a) Modify the int findMax (int[]) function in Program 7.6 of Bronson text to additionally find the minimum. As such develop the function with the prototype void findMaxMin (int[],int&, int&) [10 points] (b) Include the function developed in part (a) above in a complete program and run the program. Use at least two sets of data to verify the function. I5+5+5+5 points] (c) Rewrite the function developed in part () above using vector class and functions specified in Table 7.2 of Bronson text. Your new function prototype will be as follows: void findMaxMin (vector &, int&, int&). Test it as in part (b) [10+5 points] PROGRAMMING PROBLEM 2 Define an array, int nums[, with a maximum of 20 integer values, and fill the array with numbers input from the keyboard or assigned by the program, Then write a function named int split (int [], int [, int [, int , int&) that reads the array and places all zeros or positive numbers in an array named positive, al negative numbers in an array named negative and returns the counts of positive integers (by value) and negative integers (by reference). Finally, have your program call a function void display(int [, int [], int, int) that displays the values in both the positive and negative arrays[S+5+5 (main)+5 (split)+ 5 (display)+5 points]

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

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

Recommended Textbook for

Relational Database Design A Practical Approach

Authors: Marilyn Campbell

1st Edition

1587193175, 978-1587193170

More Books

Students also viewed these Databases questions

Question

3. What changes should I be making?

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago