Integers are read from input and stored into a vector until- −1 is read. For each vector element E, output the result of

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Integers are read from input and stored into a vector until- −1 is read. For each vector element E, output the result of

Post by answerhappygod »

Integers Are Read From Input And Stored Into A Vector Until 1 Is Read For Each Vector Element E Output The Result Of 1
Integers Are Read From Input And Stored Into A Vector Until 1 Is Read For Each Vector Element E Output The Result Of 1 (27.43 KiB) Viewed 56 times
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 "
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply