cf118A(水题)

题意就是讲给出的字符串元音字母去掉,在每个辅音字母前加点,且小写输出。。。注意y也要去掉(以我英语挂科的水平也知道y是辅音字母)。。。

水题。。

直接上代码好了。。。

 1 #include <iostream>
 2 #include <stdio.h>
 3 #include <string.h>
 4 #define MAXN 100+10
 5 using namespace std;
 6 
 7 char s[]={"aeiouAEIOUyY"};
 8 
 9 int main(void)
10 {
11     char a[MAXN];
12     gets(a);
13     for(int i=0; i<strlen(a); i++)
14     {
15         if(strchr(s, a[i])==NULL)
16         {
17             if(a[i]<'a')  a[i]+=32;
18             cout << ".";
19             cout << a[i];
20         }
21     }
22     cout << endl;
23     return 0;
24 }
我就是我,颜色不一样的烟火 --- geloutingyu
原文地址:https://www.cnblogs.com/geloutingyu/p/5733898.html