Question: c++ Double any element's value that is less than controlValue. Ex: If controlValue = 10, then dataPoints = {2, 12,9,20} becomes {4, 12, 18, 20)



c++
Double any element's value that is less than controlValue. Ex: If controlValue = 10, then dataPoints = {2, 12,9,20} becomes {4, 12, 18, 20) TILUUL 1 test passed All tests passed VUSLI LUI 2 using namespace std; 3 4 int main() { 5 const int NUM_POINTS = 4; 6 int dataPoints [NUM_POINTS); 7 int controlValue; 8 int i; 9 19 cin >> controlValue; 11 12 for (i = 0; i > dataPoints[i]; 14 } 15 16 * Your solution goes here */ 17 18 for (i = 0; i 2 using namespace std; 3 4 int main() { 5 const int NUM_VALS = 4; 6 int testGrades[NUM_VALS]; 7 int i: 8 int sumExtra = -9999; // Assign sumExtra with before your for loop 9 10 for (i = 0; i > testGrades[i]; 12 } 13 14 1* Your solution goes here */ 15 16 cout 2 using namespace std; 1 test passed All tests passed 4 int main() { 5 const int NUM_VALS = 4; 6 int hourlyTemp [NUM_VALS]; 7 int i; 8 9 for (i = 0; i > hourlyTemp[i]; 11 } 12 13 \* Your solution goes here */ 14 15 cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
