Untitled
unknown
c_cpp
3 years ago
720 B
5
Indexable
#include <bits/stdc++.h> using namespace std; int main() { //ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); string s1; cin>>s1; cin.ignore(); transform(s1.begin(), s1.end(), s1.begin(), ::tolower); int l = s1.size(); for (size_t i = 0; i < l; i++) { if(s1[i] == 'a' || s1[i] == 'e' || s1[i] == 'i' || s1[i] == 'o' || s1[i] == 'u' || s1[i] == 'y') { s1.erase(i,1); } if(s1[i] != 'a' || s1[i] != 'e' || s1[i] != 'i' || s1[i] != 'o' || s1[i] != 'u' || s1[i] != 'y') { char tmp = s1[i]; s1[i-1] = '.'; s1[i] = tmp; } } cout << s1; return 0; }
Editor is loading...