Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main () {
  4.  
  5. int a,c(0);
  6. cin>>a;
  7.  
  8. for(int i=1;i<=a;i++){
  9. if(a%i==0)c+=1;
  10. }
  11. if(c==2)cout<<"broj je prost";
  12. else cout<<"broj nije prost";
  13.  
  14.  
  15.  
  16.  
  17.  
  18. system("pause");
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement