Question: in C + + Integer numMembers is read from input as the number of elements in the vector that follows. Perform the following tasks: Output

in C++
Integer numMembers 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 816795160133868226, then the output is:
Forward: 167*95*160*133*86*82*2*6*
Backward: 6*2*82*86*133*160*95*167*

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!