Question: I need help with this C++ question. Thanks in advance! Subtract 4 to any element's value that is greater than maxval. Ex: If maxVal-10, then

I need help with this C++ question.
Thanks in advance!  I need help with this C++ question. Thanks in advance! Subtract

Subtract 4 to any element's value that is greater than maxval. Ex: If maxVal-10, then dataPoints-(2, 12, 9, 20} becomes8, 9 16) 5 int main) ( 6 int maxVal; 7int NUM POINTS; 8 unsigned int i; cin >>maxVal 10 cinNUN POINTS; 11 vector int> dataPoints NUM POINTS) 12 13 for (i - 0; dataPoints.size(); ++) { 14 15 16 17 Your solution goes here 18 19 for (i - 0; dat aPoints.size(); ++1) { 20 21 cn >> dataPoints.at(1); cout

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!