Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5.  
  6. int main(int argc, char const *argv[]){
  7.     char sh;
  8.     do{
  9.         cin >> sh;
  10.         if(sh){
  11.             cout << "sex: " << sh << endl;
  12.         }else cout << "Символ не введён!\n";
  13.     }while(sh != 's');
  14. }
  15.  
  16. ./a.out
  17. \dfhfhdfdfh
  18. sex: \
  19. sex: d
  20. sex: f
  21. sex: h
  22. sex: f
  23. sex: h
  24. sex: d
  25. sex: f
  26. sex: d
  27. sex: f
  28. sex: h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement