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
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
quad
then the output is:
Average:
Numbers less than average:
#include
#include
using namespace std;
int main
vector idNumbers;
int numStudents;
int inVal;
unsigned int i;
double averageStudents;
int sumElementData ;
cin numStudents;
for i ; i numStudents; i
cin inVal;
idNumbers.pushbackinVal;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
