Advertisement
LabiinfaCibGyti

laba8.11

Dec 18th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 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,b;
  9.     getline(cin, s);
  10.     if (s[0]>'A' && s[0]<'z')
  11.         b=b+'?';
  12.     for (i=0;i<s.length();i++)
  13.     {
  14.         if (s[i]==' ' && s[i+1]>'a' && s[i]<'z')
  15.             b=b+' '+'?';
  16.         else b=b+s[i];
  17.     }
  18.     cout<<b<<endl;
  19.     return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement