cis 210 hw.................... - 24962

Request Posted by
Earned: $7393.06
Request Detail
Price: $18
  • From: Computer Science, Programming
  • Due on: Fri 13 Sep, 2013 (02:22pm)
  • Asked on: Fri 13 Sep, 2013
  • Due date has passed, but you can still Post Solution.
Description

Write a recursive void function called rotateLeft that rotates the first n integers in an array to the left. To rotate n items left, rotate the first n-1 items left recursively, and then exchange the last two items. For example, to rotate the five items:

50 60 70 80 90

to the left, recursively rotate the first four items to the left:

60 70 80 50 90

and then exchange the last two items:

60 70 80 90 50

Test it with a main program that takes as input an integer count followed by the values to rotate. Output the original values and the rotated values. Do not use a loop in rotateLeft. Output the value in the main program, not in the procedure.

Sample input: 5 50 60 70 80 90

Sample output:

original list: 50 60 70 80 90

Rotated list: 60 70 80 90 50

2 Solution for cis 210 hw....................
Title Price Category solution By purchased  
solution for both question
$17.50 no category fornicola 1 time(s)
code for your given requirement
$18.00 no category PRB04 1 time(s)
Please Login or Register to Submit the Solution for the Request