subject

C++: Read integers from input and store each integer into a vector until -1 is read. Do not store-1 into the vector. Then, output all values in the vector (except the last value) with the last value in the vector added to each value. Output each value on a new line.
Ex: If the input is -24 28-48-1, the output is:
-16
36
4
(I've been trying to use push_back and pop_back but I'm clearly messing up somewhere and I don't know where)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 13:30
Font size, font style, and are all aspects of character formatting.
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
In a game with three frames, where will the objects on layer 1 appear? a. next to the play area b. in the middle of the game c. behind everything else d. in front of everything else
Answers: 1
question
Computers and Technology, 24.06.2019 02:30
Which option completes the explanation for conflict of interest in an organization
Answers: 1
question
Computers and Technology, 24.06.2019 11:00
The program below has been generalized to read a user's input value for hourlywage. run the program. notice the user's input value of 10 is used. modify that input value, and run again. generalize the program to get user input values for workhoursperweek and workweeksperyear (change those variables' initializations to 0). run the program. monthsperyear will never change, so define that variable as final. use the standard for naming final variables. ex: final int max_length
Answers: 2
You know the right answer?
C++: Read integers from input and store each integer into a vector until -1 is read. Do not store-1...
Questions
question
Mathematics, 27.01.2021 01:00
question
Mathematics, 27.01.2021 01:00
Questions on the website: 13722361