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
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
Get step-by-step solutions from verified subject matter experts
