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

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

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!