Advertisement
Guest User

Untitled

a guest
Oct 10th, 2015
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #include <iostream>
  2. int main()
  3. {
  4. int liczba;
  5. bool wynik;
  6.  
  7.  
  8. do
  9. {
  10. std::cout << "podaj liczbe" << std::endl;
  11. std::cin >> liczba;
  12. wynik = std::cin.good();
  13. if (std::cin.good())
  14. wynik = true;
  15. std::cin.clear();
  16. std::cin.sync();
  17.  
  18. } while( wynik == false );
  19.  
  20. std::cout << "wpisales :" << liczba;
  21.  
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement