fojtasd

Untitled

Oct 29th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. #include <string>
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10.  
  11. char input;
  12. cout << "Zadej cislo ve dvojkove soustave:" << endl;
  13.  
  14. while (cin.get(input)){
  15. if (input=='/n'){ cout << "Nespravny vstup." << endl;
  16. break;}
  17. if (input!=1 || input!=0) { cout << "Nespravny vstup." << endl;
  18. break;
  19. }
  20. else cout << "b" << endl;
  21.  
  22. }
  23.  
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment