Question: Integer numElements is read from input. Then numElements doubles are read and stored in vector propertiesList. Write a loop that assigns each element in propertiesList

Integer numElements is read from input. Then numElements doubles are read and stored in vector propertiesList. Write a loop that assigns each element in propertiesList that is greater than 2000.0 with 2000.0. Ex: If the input is 32706.0356.01828.0, then the output is: Raw properties: 2706.0356.01828.0 Adjusted properties: 2000.0356.01828.0 \begin{tabular}{l|l} 1 & \#include \\ 2 & \#include \\ 3 & \#include \\ 4 & using namespace std; \\ 5 & \\ 6 & int main ()\{ \\ 7 & int numElements; \\ 8 & unsigned int i; \\ 9 & vector propertiesList; \\ 10 & \\ 11 & cin >> numElements; \\ 12 & \\ 13 & propertiesList.resize(numElements); \\ 14 & \\ 15 & for (i =0;i propertiesList.at (i); \\ 17 & \} \end{tabular}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
