Write a program that reads integers and stores them in an array. Then, the program should rotate the elements one place to the right. For example, if the array were 1, -9, 5, 3, the rotated array would be 3, 1, -9, 5.
寫一個程式 輸入整數放在陣列裡。將陣列裡面的元素向右旋轉一次
Example input 1: First number is the element of array to input, then the list of numbers
4
1 -9 5 3
Example output 1:
3 1 -9 5
Example input 2:
5
2 7 9 3 12
Example output 2:
12 2 7 9 3
Please remember, you may correct the cases, but your code always be revised!