Question: C++ 1. 2.Given a set of data, output the middle item (if even number of items, output the two middle items). If the input is

C++

1.C++ 1. 2.Given a set of data, output the middle item (if

2.Given a set of data, output the middle item (if even number of items, output the two middle items). If the input is 5 7 9 11 13 -1 (a negative indicates end), the output is 9. If the input is 5 7 9 11 -1, the output is 7 9

3.even number of items, output the two middle items). If the input

Write a program the reads a list of integers, and outputs those integers in reverse. The input begins with an integer indicating the number of integers that follow. For coding simplicity, follow each output integer by a space, even the last one. If the input is 5 2 4 68 10, the output is: 10 8 6 4 2 To achieve the above, first read the integers into a vector. Then output the vector in reverse. LAB 8.11.1: C LAB: output numbers in reverse ACTIVITY 0 10 main.cpp Load default template... 1 #include Kiostream> 2 #include . Must include vector library to use vectors 3 using namespace std; 5 int main f 6 vector int user Ints A vector to hold the user's input integers 8 Type your code here. 10 return 0; 11 12

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!