题目链接
http://codeforces.com/problemset/problem/118/A
#include<iostream> #include<string> #include<cctype> #include<algorithm> using namespace std; int main() { string str; cin>>str; int i; //将代码变成小写 transform(str.begin(), str.end(), str.begin(), ::tolower); //移除特定的字符串 str.erase(std::remove(str.begin(), str.end(), ‘a‘), str.end()); str.erase(std::remove(str.begin(), str.end(), ‘e‘), str.end()); str.erase(std::remove(str.begin(), str.end(), ‘i‘), str.end()); str.erase(std::remove(str.begin(), str.end(), ‘o‘), str.end()); str.erase(std::remove(str.begin(), str.end(), ‘u‘), str.end()); str.erase(std::remove(str.begin(), str.end(), ‘y‘), str.end()); int len=str.length(); for(i=0;i<len;i++) { cout<<"."<<str[i]; } return 0; }
原文地址:https://www.cnblogs.com/CMlhc/p/9194056.html
时间: 2024-10-09 01:28:20