how to find prime numbers in a range
class main{
public static void main(String [] args){
Scanner sc = new Scanner(System.in); // Scanner function should be imported//
int a = sc.nextInt();
int c = 0;
for(int i=2;i<=a;i++) {
for(int j=2;j<=i;j++) {
if(i==j) {
c++;
}
if(i%j==0) {
break;
}
}
}
System.out.println("\nTotal prime numbers ("+a+") - "+c);
}
}