public class compositenumbers {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.println("Enter the first limit:");
int a = sc.nextInt();
System.out.println("Enter the second limit:");
int b = sc.nextInt();
for (int i = a + 1; i <= b - 1; i++) {
int c = 0;
for (int j = 1; j <= 100; j++) {
if (i % j == 0) {
c++;
}
}
if (c > 2) {
System.out.println(i);
}
}
}
package com.dain.logics;
import java.util.Scanner;
public class compositenumbers { public static void main(String[] args) {
}