Advertisement
Guest User

limit

a guest
Nov 21st, 2014
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.43 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int broj;
  9.    
  10.     cout << "Unesite neki broj: " << endl;
  11.    
  12.     while(!(cin>>broj))
  13.     {
  14.         system ("cls");
  15.         cout<<"Unesite neki broj:" << endl;
  16.        
  17.         cin.clear();
  18.         cin.ignore(numeric_limits<streamsize>::max(), '\n');
  19.     }
  20.    
  21.     cout << "Broj = " << broj;
  22.    
  23.     system("pause>nul");
  24.     return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement