Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Prime {
- public static void main(String[] args)
- {
- int i;
- int stevilo=20;
- boolean pra=true;
- for(i=2;i<stevilo;i++)
- {
- if(stevilo%i==0) {
- pra=false;
- break;
- }
- }
- if (pra==true)
- System.out.print("stevilo je prastevilo");
- if (pra==false)
- System.out.print("Stevilo ni prastevilo");
- }
- }
Add Comment
Please, Sign In to add comment