Question: Integer numDistance is read from input as the number of elements in the vector that follows. Perform the following tasks: Output Forward: . Use

Integer numDistance is read from input as the number of elements in the vector that follows. Perform the following tasks:
Output "Forward: ".
Use a for loop to output all the elements in vector idListings that are in order.
Output "Backward: ".
Use a for loop to output all the elements in vector idListings that are in the opposite order.
In both loops, output a "*" after each element, including the last element, and end with a newline.
Ex: If the input is

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 Programming Questions!