fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5.  
  6. string strlower(string s) {
  7. for (int i = 0; i < s.length(); i++) {
  8. if (s[i] >= 'A' && s[i] <= 'Z')
  9. s[i] = s[i] + 32;
  10. }
  11. return s;
  12. }
  13.  
  14.  
  15. int main() {
  16. string str, ans = "";
  17. while (cin >> str && str.length() > 4) {
  18. for (int i = 0; i < str.length(); ++i)
  19. if ((str[i] >= 'a' && str[i] <= 'z') || (str[i] >= 'A' && str[i] <= 'Z') || (str[i] >= '0' && str[i] <= '9' ) || (str[i] == ' ')) {
  20. ans += strlower(str);
  21. }
  22. }
  23. cout << ans;
  24. return 0;
  25. }
Success #stdin #stdout 0s 4448KB
stdin
♥♥♥ C++2017 and Pas Cal♥♥♥
stdout
c++2017c++2017c++2017c++2017c++2017