Answer to Question #91254 in C++ for matimu

Question #91254
Write a function named "shift_right" that takes as its arguments the following:
(1) an array of floating point values;
(2) an integer, call it "left", that tells the leftmost cell of the part of the array to be shifted;
(3) an integer, call it "right", that tells the rightmost cell of the part of the array to be shifted;
(4) a positive integer, call it "distance" that tells how many cells to shift by.
The function should make sure that left is less than or equal to right, and that distance is greater
than zero. If either of these conditions fails, the function should return the value 1 to indicate an error.
Otherwise it should shift by distance cells the contents of the array cells with subscripts running from
left to right . Thus, for example, if the array passed to the function looks like this:
1
Expert's answer
2019-07-01T01:13:37-0400
Dear matimu, 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
APPROVED BY CLIENTS