Question: Jump to level 1 Integer numstudents is read from input as the number of elements in the vector that follows. Then, numstudents elements are read

Jump to level 1
Integer numstudents is read from input as the number of elements in the vector that follows. Then, numstudents elements are read from input into the vector idNumbers. Use a loop to access each element in the vector and if the element is less than averageStudents, output the element followed by a space.
Ex: If the input is
6
\(118112\quad 9157100178\)
then the output is:
Average: 112
Numbers less than average: 9100
```
#include
#include
using namespace std;
int main(){
vector idNumbers;
int numStudents;
int inVal;
unsigned int i;
double averageStudents;
int sumElementData =0;
cin >> numStudents;
for (i =0; i numStudents; ++i){
cin >> inVal;
idNumbers.push_back(inVal);
```
Jump to level 1 Integer numstudents is read from

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