Q3 Vector 20 Points Q3.1 max 10 Points Given an array of int numbers, write a function that return the maximum value of

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Q3 Vector 20 Points Q3.1 max 10 Points Given an array of int numbers, write a function that return the maximum value of

Post by answerhappygod »

Q3 Vector 20 Points Q3 1 Max 10 Points Given An Array Of Int Numbers Write A Function That Return The Maximum Value Of 1
Q3 Vector 20 Points Q3 1 Max 10 Points Given An Array Of Int Numbers Write A Function That Return The Maximum Value Of 1 (46.74 KiB) Viewed 32 times
Q3 Vector 20 Points Q3.1 max 10 Points Given an array of int numbers, write a function that return the maximum value of that array. Function prototype is provided below. E.g., 1: (3, 5, 7, -9, 100, 0, -20) 0:100 int maxArr(vecto arr); // you can test your code in main function like this int main(){ } vector<int> arr = (3, 5, 7, 9, 100, 0, -20); cout << maxArr(arr) << endl; NOTES: 1. You only need to put the maxArr function in the answer box (no need for main function). If you use some given functions from C++ libraries, please let me know what headers you include. 2. You need to make sure that your provided code works. The best way to do it is write your code in your computer, make sure it compiles and run properly, then copy then maxArr function and paste it in the answer box. Enter your answer here Save Answer Q3.2 Filter 10 Points Given an array of int numbers arr, write a function that return an array that only contains odd numbers from arr E.g., 1: (2, 6, 5, -7, 9, 4, 13} O: (5, -7, 9, 13) vector<int> oddFilter(vector<int> arr); NOTES: See Q3.1. Enter your answer here Save Answer
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply