Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- freopen("input.txt", "r", stdin);
- freopen("output.txt", "w", stdout);
- string str;
- while (getline(cin, str)) {
- for (int i = 0; i < str.length(); i++)
- if ((str[i] >= 'A' && str[i] <= 'Z') ||
- (str[i] >= 'a' && str[i] <= 'z') ||
- (str[i] == ' ') ||
- str[i] >= '0' && str[i] <= '9') {
- if (str[i] >= 'A' && str[i] <= 'Z') {
- char small_sy((int)str[i] + 32);
- cout << small_sy;
- }
- else
- cout << str[i];
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment