Vowel Counting

Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other)
Total Submission(s) : 58   Accepted Submission(s) : 18
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
 
Author
AppleMan
 
Source
HDU 2nd “Vegetable-Birds Cup” Programming Open Contest

 #include <stdio.h>
#include <stdlib.h>
#include <string.h> int main()
{
int T,L,i;
char a[];
scanf("%d",&T);
while(T--)
{
scanf("%s",a);
L=strlen(a);
for(i=;i<L;i++)
{
if(a[i]=='a'||a[i]=='e'||a[i]=='i'||a[i]=='o'||a[i]=='u')
{
a[i]-=;
continue;
}
else if(a[i]=='A'||a[i]=='E'||a[i]=='I'||a[i]=='O'||a[i]=='U')
{
continue;
}
else
{
if(a[i]>='A'&&a[i]<='Z')
{
a[i]+=;
continue;
}
}
}
printf("%s\n",a);
}
return ;
}

Vowel Counting的更多相关文章

  1. 杭电oj 3079 Vowel Counting

    Tips:可以先将输入的字符串全部转化为小写字母,然后再将元音字母变为大写,时间复杂度O(n) #include<stdio.h> #include<string.h> #in ...

  2. HDU 3079 Vowel Counting (水题。。。判断元音)

    题意:n个字符串,如果元音就是输出大写,否则输出小写. 析:没啥可说的,只要判断AEIOU就OK了. 代码如下: #include <iostream> #include <cstd ...

  3. 杭电OJ(HDU)-ACMSteps-Chapter Two-《An Easy Task》《Buildings》《decimal system》《Vowel Counting》

    http://acm.hdu.edu.cn/game/entry/problem/list.php?chapterid=1§ionid=2 1.2.5 #include<stdio.h> ...

  4. 萌新笔记——Cardinality Estimation算法学习(二)(Linear Counting算法、最大似然估计(MLE))

    在上篇,我了解了基数的基本概念,现在进入Linear Counting算法的学习. 理解颇浅,还请大神指点! http://blog.codinglabs.org/articles/algorithm ...

  5. POJ_2386 Lake Counting (dfs 错了一个负号找了一上午)

    来之不易的2017第一发ac http://poj.org/problem?id=2386 Lake Counting Time Limit: 1000MS   Memory Limit: 65536 ...

  6. ZOJ3944 People Counting ZOJ3939 The Lucky Week (模拟)

    ZOJ3944 People Counting ZOJ3939 The Lucky Week 1.PeopleConting 题意:照片上有很多个人,用矩阵里的字符表示.一个人如下: .O. /|\ ...

  7. find out the neighbouring max D_value by counting sort in stack

    #include <stdio.h> #include <malloc.h> #define MAX_STACK 10 ; // define the node of stac ...

  8. 1004. Counting Leaves (30)

    1004. Counting Leaves (30)   A family hierarchy is usually presented by a pedigree tree. Your job is ...

  9. 6.Counting Point Mutations

    Problem Figure 2. The Hamming distance between these two strings is 7. Mismatched symbols are colore ...

随机推荐

  1. iScroll屏幕滑动函数封装总结

    //iScroll.js屏幕滚动函数 function funScroll(a,b) { var d; function beforload() { d = new iScroll(a, { chec ...

  2. flume-hdfs sinks报错

    flume使用hdfs sinks时候报错:org.apache.flume.EventDeliveryException: java.lang.NullPointerException: Expec ...

  3. 关于安装第三方模块和PILLOW

    看廖雪峰老师这一节的教程卡在这里挺久了 在谷歌上了搜了很久,最后根据这个教程上解决了这个问题 http://www.yihaomen.com/article/python/566.htm 觉得自己好蠢 ...

  4. ensp实战之防火墙安全转发策略

    本次实验用防火墙是USG6000V,拓扑图如下: 步骤一: 按上面配好PC1.2.3以及WWW服务器的IP地址.子网掩码以及网关: 步骤二: 进入防火墙的CLI命令模式下,按一下命令配置: 配置各个接 ...

  5. 淘淘商城_day11_课堂笔记

    今日大纲 发布前的准备 实施发布 一部分是由我来发布 一部分是由你们来发布 讲解分布式部署架构 测试 功能测试 压力测试 项目实战的准备以及分组 分组 抽取功能 讲解所需要开发的功能 项目部署上线流程 ...

  6. Chapter 2 Open Book——26

    "Oh." He let it drop. I looked away awkwardly. 哦,他让它走了.我笨拙的看向别处. "哦."他不再纠缠于这个问题. ...

  7. 关于闭包与for循环的理解

    function createFunction1(){ for(var i=0;i<5;i++){ function s(){ console.log(i); } s(); } } create ...

  8. Apache Kafka开发入门指南(2)

    Apache Kafka目标是统一离线和在线处理,与Flume和Scribe相比较,Kafka在处理活动流数据方面更具优势.但是从架构的视野来看,Kafka与传统的消息系统(例如ActiveMQ或Ra ...

  9. @NotNull vs @Column(nullable = false)

    参考:Confusion: @NotNull vs @Column(nullable = false)  

  10. Sass入门:第四章

    1.加法 加法运算是Sass中运算的一种,在变量或属性中都可以做加法运算.如: .box { width: 20px + 8in; } 编译出来的CSS: .box { width: 788px; } ...