![]() |
|
|
|
#11
|
|||
|
|||
|
Re: Underworldlive version 3.0 thread
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 );
}
|
|
|