Answer to Question #291547 in C++ for mark

Question #291547

Did you know that you can also reverse arrays and group them according to your liking with proper code?


Let's try it to believe it.



Instructions:

  1. Input a random positive integer. Then, create an integer array with a size the same as the inputted integer.
  2. Then, using loops, add random integer values into the array one by one. The number of values to be stored is dependent on the inputted odd integer on the first instruction.
  3. Print out the list's new order in this manner, with each number separated by a space per row:
  4. second-half values
  5. middle value
  6. first-half values
  7. Refer to the sample output for a clearer view on how it is to be printed out.

Input

The first line contains an odd positive integer. It is guaranteed that this integer is greater than or equal to 3.

The next lines contains an integer.

5
1
3
4
5
2

Output

A line containing grouped arrays.

{2,5}-{4}-{3,1}
1
Expert's answer
2022-01-28T07:10:30-0500
Dear mark, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog