Question: Hello, I need help solving this Lab simulation, It uses Populating a vector with a for loop for vectors statements and I am very new

Hello, I need help solving this Lab simulation, It uses Populating a vector with a for loop for vectors statements and I am very new at coding on so I need help solving it. It is very difficult. It is very confusing since the there are multiple inputs and on can only code it once.

a for loop to populate vector userGuesses with NUM_GUESSES integers. Read integers using cin. Ex: If NUM_GUESSES is 3 and user enters 9 5 2, then userGuesses is {9, 5, 2}.

#include

#include

using namespace std;

int main() {

const int NUM_GUESSES = 3;

vector userGuesses(NUM_GUESSES);

int i;

/* Your solution goes here*/

for (i = 0; i

cout

}

return 0;

}

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 Mathematics Questions!