118A. String Task problem link
Codeforces 118A. String Task solution in C
#include<stdio.h>int main() { int i; char s[101]; gets(s); strlwr(s); for(i=0;s[i]!='\0';i++) { if(s[i]=='a'||s[i]=='e'||s[i]=='i'||s[i]=='o'||s[i]=='u'||s[i]=='A'||s[i]=='E'||s[i]=='O'||s[i]=='I'||s[i]=='U'||s[i]=='y'||s[i]=='Y') { continue;
} else { printf(".%c",s[i]); } } printf("\n"); return 0; }
Codeforces 118A. String Task solution in CPP
#include <iostream> #include <cstring> #include <cctype> using namespace std; int main() { string s; getline(cin, s); for (char &c : s) c = tolower(c); for (char c : s) { if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y') { continue; } else { cout << "." << c; } } cout << endl; return 0; }
Thanks for sharing. I read many of your blog posts, cool, your blog is very good.
Muchas gracias. ?Como puedo iniciar sesion?