题目链接:http://www.codeforces.com/problemset/problem/118/A
题意:字符串转换……
C++代码:
#include <string> #include <iostream> using namespace std; string s; bool _in(char c, string s) { for (int i =0 ; i < s.length(); i ++) if (c == s[i]) return true; return false; } int main() { cin >> s; int len = s.length(); for (int i = 0; i < len; i ++) { char c = s[i]; if (c >= 'A' && c <= 'Z') c += 32; if (_in(c, "aeiouy")) ; else cout << "." << c; } return 0; }