SHARE
TWEET

32

a guest Oct 15th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.util.Scanner;
  2.  
  3. public class HelloWorld{
  4.  
  5.      public static void main(String []args){
  6.           Scanner in = new Scanner(System.in);
  7.          int n = in.nextInt();
  8.          int s = 0;
  9.          int k=0;
  10.          while (k!=1) {
  11.              k = 0;
  12.              int i=1;
  13.              n+=1;
  14.              while(i!=n-1){
  15.                 if (n%i==0){
  16.                     k+=1;
  17.                
  18.                 }
  19.                 i++;
  20.              }
  21.          }
  22.         System.out.println(n);
  23.          }
  24.      }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top