-->
当前位置:首页 > 题库

PROGRAMMING:Circular movement

Luz5年前 (2021-05-10)题库487
Input two positive integers n and m (1 < m < n < = 10), then input n integers, line up these numbers, move m positions to the right circularly (the number moved out from the right moves in from the left), and finally output the N integers after moving.
It is required to define and call the function mov (x, N, m) to realize the above function of circular movement. The type of function parameter x is integer pointer, the type of parameter n and M is int, and the type of function is void.
Output format: the data is separated by spaces, and there are no spaces after the last data set
Input and output example: description in brackets
###Input example:
```in
5 3 (n=5,m=3)
1 2 3 4 5 (5 integers)
```
###Output example:
```out
After move: 3 4 5 1 2
```






answer:If there is no answer, please comment