Integers are read from input and stored into a vector until- −1 is read. For each vector element E, output the result of
Posted: Thu Jul 14, 2022 2:28 pm
Integers are read from input and stored into a vector until- −1 is read. For each vector element E, output the result of subtractir the vector's last element from E. End each number with a newline. Ex: If the input is −9.1519−1, the vector's last element is 9. Thus, the output is: −18−24−80 Note: - The input has at least three integers. - A vector's back0 function returns the vector's last element. Ex. myvector.back0 1 Hincluae 3 using namespace std: 4 5 int main(){ 6 int i; 7 vectorcints integervector; 8 int value; 10 cin so value: 11 while (value 1=−1 ) 1 12. Integervector, push_bock(value); 13 cin → value; using mankspace star. 14−13 16 In your code goes here "