Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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! image text in transcribed
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

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_2

Step: 3

blur-text-image_3

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

Database Processing

Authors: David M. Kroenke, David Auer

11th Edition

B003Y7CIBU, 978-0132302678

More Books

Students also viewed these Databases questions