首页 > 程序开发 > 软件开发 > 其他 > 正文
Vowel Counting
2017-03-14       个评论    来源:ljf_study的博客  
收藏    我要投稿

Vowel Counting

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 3523 Accepted Submission(s): 1936
Problem Description The "Vowel-Counting-Word"(VCW), complies with the following conditions.
Each vowel in the word must be uppercase.
Each consonant (the letters except the vowels) must be lowercase.
For example, "ApplE" is the VCW of "aPPle", "jUhUA" is the VCW of "Juhua".
Give you some words; your task is to get the "Vowel-Counting-Word" of each word.
Input The first line of the input contains an integer T (T<=20) which means the number of test cases.
For each case, there is a line contains the word (only contains uppercase and lowercase). The length of the word is not greater than 50.
Output For each case, output its Vowel-Counting-Word.
Sample Input
4
XYz
application
qwcvb
aeioOa 
Sample Output
xyz
ApplIcAtIOn
qwcvb
AEIOOA
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
bool isVOW(char c)
{
    if(c=='a'||c=='e'||c=='i'||c=='o'||c=='u'||c=='A'||c=='E'||c=='I'||c=='O'||c=='U'){
        return true;
    }else {
        return false;
    }
}
int main()
{
    int N;
    cin>>N;
    for(int j=0;j>str;
        for(int i=0;i='a'&&str[i]<='z'){
                    str[i]=str[i]-32;
                }
            }else {
                if(str[i]>='A'&&str[i]<='Z'){
                    str[i]=str[i]+32;
                }
            }
        }
        cout<
点击复制链接 与好友分享!回本站首页
相关TAG标签 Vowel Counting
上一篇:SSL 1720 凸包
下一篇:最后一页
相关文章
图文推荐
文章
推荐
点击排行

关于我们 | 联系我们 | 广告服务 | 投资合作 | 版权申明 | 在线帮助 | 网站地图 | 作品发布 | Vip技术培训
版权所有: 红黑联盟--致力于做实用的IT技术学习网站