Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- int main()
- {
- int broj;
- std :: cout << "Unesi broj:" << std :: endl;
- for(;;){
- std :: cin >> broj;
- if(std:: cin) break;
- std:: cout << "Unesi ponovo broj:" << std :: endl;
- std:: cin.clear();
- std:: cin.ignore(1000, '\n');
- }
- if(broj==(int)broj && broj>0)
- std:: cout << "Broj je prirodan" << std :: endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement