美文网首页
118A - String Task

118A - String Task

作者: 社交帐号直接注册 | 来源:发表于2018-01-11 20:55 被阅读0次
#include <iostream>
#include <cstring>
using namespace std;

int main()
{
    char a[101];
    int i, length;
    cin >> a;
    length = strlen(a);
    for (i = 0; i < length; i++)
    {
        if (a[i] == 'a' || a[i] == 'A' || a[i] == 'o' || a[i] == 'O'
            || a[i] == 'y' || a[i] == 'Y' || a[i] == 'e' || a[i] == 'E' ||
            a[i] == 'u' || a[i] == 'U' || a[i] == 'i' || a[i] == 'I')
        {
            continue;
        }
        else
        {
            if (a[i] >= 'A'&&a[i] <= 'Z')
            {
                a[i] = a[i] + 32;
            }
            cout << "." << a[i];
        }
    }
    cout << endl;

    system("pause");
}

相关文章

网友评论

      本文标题:118A - String Task

      本文链接:https://www.haomeiwen.com/subject/qkgtoxtx.html