C#: rotate the elements of a given array of integers in left direction and return the new array
Rotate Array Left
Write a C# Sharp program to rotate the elements of a given array of integers (length 4 ) in the left direction and return the array.
Test Data: 90, 30, 50, 40
Sample Output: Rotated array: 30 50 40 90
Test Data: -40, 10, -20, -10
Sample Output: Rotated array: 10 -20 -10 -40
Visual Presentation:

Sample Solution:-
C# Sharp Code:
Sample Output:
Rotated array: 20 -30 -40 10
Flowchart:

C# Sharp Code Editor:
Improve this sample solution and post your code through Disqus
Previous: Write a C# Sharp program to compute the sum of the elements of an given array of integers.
Next: Write a C# Sharp program to reverse a given array of integers and length 4
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.