myLoveOnlyForYou

Untitled

Feb 28th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include "pch.h"
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5. int main() {
  6. freopen("input.txt", "r", stdin);
  7. freopen("output.txt", "w", stdout);
  8. string str;
  9. while (getline(cin, str)) {
  10. for (int i = 0; i < str.length(); i++)
  11. if ((str[i] >= 'A' && str[i] <= 'Z') ||
  12. (str[i] >= 'a' && str[i] <= 'z') ||
  13. (str[i] == ' ') ||
  14. str[i] >= '0' && str[i] <= '9') {
  15. if (str[i] >= 'A' && str[i] <= 'Z') {
  16. char small_sy((int)str[i] + 32);
  17. cout << small_sy;
  18. }
  19. else
  20. cout << str[i];
  21. }
  22. }
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment