Code:
public static void main(String[] args) {
System.out.print("splash me a number: ");
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int x, y, c = 0;
for( x = 2; x < n ; x++ ) {
if( x % 2 != 0 || x == 2 ) {
for( y = 2; y x / 2 ) {
System.out.println( x );
c++;
}
}
}
System.out.println( "\n total: " + c );
}
Is the slacker way i'd do it