Advertisement
LabiinfaCibGyti

laba8roma

Dec 11th, 2019
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.27 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <iostream>
  3. #include <string>
  4. using namespace std;
  5. int _tmain(int argc, _TCHAR* argv[])
  6. {
  7.     int i;
  8.     string s;
  9.     getline(cin, s);
  10.     for (i=0;i<s.length();i++)
  11.     {
  12.         if (s[i]==' ')
  13.             s[i]='_';
  14.         cout<<s[i];
  15.     }
  16.     cout<<endl;
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement