1.题目链接:算法基础-字符移位
2.Code
#include<bits/stdc++.h>
using namespace std;
const int maxn = 1e3+5;
int main()
{
char str[maxn];
while(cin>>str){
int len = strlen(str);
int more = len-1;
for(int i = 0; i <= more;)
{
if(str[i] >= 'A' && str[i] <= 'Z')
{
char tmp = str[i];
for(int j = i; j < len; ++j){
str[j] = str[j+1];
}
str[len-1] = tmp;
more--;
}
else{
++i;
}
}
cout<<str<<endl;
}
return 0;
}
/*
AkleBiCeilD
*/