Codes: part 16

import java.math.*;
public class abc_s{
public static void main (String[] args){
int n1,n2,a1,a2;
for(n1=2; n1<3300; n1++){
for(a1=2; a1<n1; a1++){
if(n1 % a1 == 0)
break;}
if(n1 == a1)
for(n2=2; n2<2500; n2++){
for(a2=2; a2<n2; a2++){
if(n2 % a2 == 0)
break;}
if(n2 == a2)
if(n2-n1 == 2418 )
System.out.println(“(“+n1+”, “+n2+”)”);
}}}}

Advertisements