Question: Language: C++ Write a program which does the following using a deque object: 1. Create a deque A able to store float values. 2. Read

Language: C++ Write a program which does the following using a deque object: 1. Create a deque A able to store float values. 2. Read floats from the keyboard until the entered float value is 0. 3. Insert the positive elements at the end of A and the negative elements at the beginning of A. 4. Print the elements of A on the standard output separated by spaces. 5. Print an empty line on the standard output. 6. Add the value 0 into the middle of the deque (between the last negative and before the first positive element). 7. Print the elements of A on the standard output separated by semicolons. Make sure that you do not print a semicolon after the last element.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!