Petya started to attend programming lessons. On the first lesson his task was to write a simple program. The program was supposed to do the following: in the given string, consisting if uppercase and lowercase Latin letters, it:

deletes all the vowels,
inserts a character “.” before each consonant,
replaces all uppercase consonants with corresponding lowercase ones.
Vowels are letters “A”, “O”, “Y”, “E”, “U”, “I”, and the rest are consonants. The program’s input is exactly one string, it should return the output as a single string, resulting after the program’s processing the initial string.

Help Petya cope with this easy task.
Input
The first line represents input string of Petya’s program. This string only consists of uppercase and lowercase Latin letters and its length is from 1 to 100, inclusive.
Output
Print the resulting string. It is guaranteed that this string is not empty.
Example
Input
tour
Output
.t.r
Input
Codeforces
Output
.c.d.f.r.c.s
Input
aBAcAba
Output
.b.c.b
题目大意:给定一个字符串,不显示其中的元音字母,辅音字母前面加’.’输出

#include 
#include 
#define MAX 100

int main()
{

    char str[MAX];
    int len,i=0;
    //printf("Input\n");
    scanf("%s",str);
    //printf("Output\n");
    for (int i = 0; str[i]!='\0'; i++){
        if (str[i]>='A'&&str[i]

其中两行print是不需要的,加上通过不了。所以注释掉了

本博客所有内容采用 知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议 进行许可

转载文章请注明:118A – String Task - https://blog.i-ll.cc/archives/94

分类: Coding

Vectors

Vectors

不知所措,才是人生。

发表评论

电子邮件地址不会被公开。 必填项已用*标注

我不是机器人*