Advertisement
Graf_Rav

huinya

Jan 11th, 2019
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main(){
  7.     setlocale(LC_ALL, "Russian");
  8.  
  9.     string input;
  10.     getline(cin, input);
  11.     for(int i = 0; i < input.length(); i++){
  12.         if((input[i] >= 'a' && input[i] <= 'z') || (input[i] >= 'A' && input[i] <= 'Z')){
  13.             cout<<"_";
  14.         }
  15.         else{
  16.             cout<<' ';
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement