#include<iostream>
#include<string>
using namespace std;
void main(){
cout << "请输入一组数据:" << endl;
int i = 1,n;
int a[100];
cin >> a[0];
while (getchar() != '\n'){
cin >> a[i];
i++;
}
cout << "请输入旋转坐标:" << endl;
cin >> n;
for (int j = i - n; j < i; j++)
cout << a[j] << " ";
for (int j = 0; j < i - n; j++)
cout << a[j] << " ";
cout << endl;
system("pause");
}
数组旋转
最新推荐文章于 2022-06-15 19:35:14 发布