Question: Jump to level 1 Integer vecvals is read from input as the number of elements in vector hourlyscores. Given the integer vector hourlyscores, write a
Jump to level
Integer vecvals is read from input as the number of elements in vector hourlyscores. Given the integer vector hourlyscores, write a
for loop that assigns sumvalues with the sum all the integers in hourlyscores that are less than
Ex: If the input is:
then the output is:
Sum of values below :
#include iostream
#include vector
using namespace std;
int main
vector int hourlyscores;
int vecyals;
int sumbalues;
unsigned int ;
int score;
cin vectals;
for ; i vectals;
cin s score;
hourlyscores pushback score;
Your solution goes here
cout "Sum of values below : sumValues endl;
return ;
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
