Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
2.C
//'main' method must be in a class 'Rextester'. //openjdk version '11.0.5' // Razak-7051 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { int n,p; Scanner s=new Scanner(System.in); System.out.println("Enter a number: "); n=s.nextInt(); for(int i=2;i<n;i++) { p=0; for(int j=2;j<i;j++) { if(i%j==0) p=1; } if(p==0) System.out.println(i); } } }
run
|
edit
|
history
|
help
0
Print Longest String
Leetcode 937. Reorder Log Files๐ฎ๐ณ๐ฎ๐ณ๐ฎ๐ณ
test
Duplicate in string
m-primes
end of bala session
CRUD vehicules
variable1
Recursive list fields
classwork