Guest User

Untitled

a guest
Jun 18th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. public class Prime {
  2. public static void main(String[] args)
  3. {
  4. int i;
  5. int stevilo=20;
  6. boolean pra=true;
  7.  
  8. for(i=2;i<stevilo;i++)
  9. {
  10. if(stevilo%i==0) {
  11. pra=false;
  12. break;
  13. }
  14. }
  15.  
  16. if (pra==true)
  17. System.out.print("stevilo je prastevilo");
  18.  
  19. if (pra==false)
  20. System.out.print("Stevilo ni prastevilo");
  21. }
  22. }
Add Comment
Please, Sign In to add comment