Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package gowno;
- public class Gowno {
- public static void main(String[] args) {
- boolean result = isPrime(500000000);
- System.out.println(result);
- }
- static boolean isPrime(int number){
- if(number <= 1){
- return false;
- }
- for (int i = 2; i < number; i++){
- int reszta = number%i;
- if (reszta == 0){
- return false;
- }
- }
- return true;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement