Computers and Technology

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)

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:20, Ab20600
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
image
Computers and Technology, 23.06.2019 12:30, umimgoingtofail
What is the difference between the internet and the world wide web?
Answers: 1
image
Computers and Technology, 23.06.2019 22:30, kayelynn003
How many points do i need before i can send a chat
Answers: 1
image
Computers and Technology, 24.06.2019 00:40, ndurairajownkpq
What social factors affect your health
Answers: 3
Do you know the correct answer?
C++: Read integers from input and store each integer into a vector until -1 is read. Do not store-1...

Questions in other subjects: