solo从小就对英文字母非常感兴趣,尤其是元音字母(a,e,i,o,u,A,E,I,O,U),他在写日记的时候都会把元音字母写成大写的,辅音字母则都写成小写,虽然别人看起来很别扭,但是solo却非常熟练。你试试把一个句子翻译成solo写日记的习惯吧。
解答要求时间限制:1000ms, 内存限制:64MB
输入
输入一个字符串S(长度不超过100,只包含大小写的英文字母和空格)。
输出
按照solo写日记的习惯输出翻译后的字符串S。
样例
输入样例 1 复制
Who Love Solo
输出样例 1
whO lOvE sOlO
c代码参考如下:
#include <stdio.h>
#include <string.h>
int num =0;
int main()
{
// please define the C++ input here. For example: int a,b; cin>>a>>b;;
// please finish the function body here.
char str[101] = {0};
int i=0;
int j=0;
while((str[j]=getchar())!= '\n'){
j++;
}
//gets(str);
for(i=0; i<100; i++){
if(str[i]>='A' && str[i]<= 'Z'){
if(str[i]!='A'&& str[i]!='E' && str[i]!='I'&&str[i]!='O'&&str[i]!='U'){
str[i]= str[i]+32;
}
}
else if(str[i]>='a' && str[i]<= 'z'){
if(str[i]=='a'|| str[i]=='e' || str[i]=='i' || str[i]=='o'|| str[i]=='u'){
str[i] = str[i]-32;
}
}
}
printf("%s\r\n",str);
return 0;
}