Vowel Counting |
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) |
Total Submission(s): 1495 Accepted Submission(s): 850 |
|
Problem Description The "Vowel-Counting-Word"(VCW), complies with the following conditions.
|
Input The first line of the input contains an integer T (T<=20) which means the number of test cases.
|
Output For each case, output its Vowel-Counting-Word.
|
Sample Input 4XYzapplicationqwcvbaeioOa
|
Sample Output xyzApplIcAtIOnqwcvbAEIOOA
|
Author AppleMan
|
Source HDU 2nd “Vegetable-Birds Cup” Programming Open Contest
|
Recommend lcy |
代码:
#include<iostream>
#include<vector>
#include<queue>
#include<stack>
#include<stdio.h>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstring>
using namespace std;//头文件
int main()
{
int n;
cin>>n;
char ch[10000];
for(int j=0;j<n;j++)
{
cin>>ch;
for(int i=0;i<strlen(ch);i++)
{
if(ch[i]<='Z'&&ch[i]>='A')
ch[i]=char(ch[i]+32);
}
for(int i=0;i<strlen(ch);i++)
{
if(ch[i]=='a')ch[i]=char(ch[i]-32);
if(ch[i]=='e')ch[i]=char(ch[i]-32);
if(ch[i]=='i')ch[i]=char(ch[i]-32);
if(ch[i]=='o')ch[i]=char(ch[i]-32);
if(ch[i]=='u')ch[i]=char(ch[i]-32);
}
for(int i=0;i<strlen(ch);i++)
{
cout<<ch[i];
}
cout<<endl;
}
return 0;
}