Ingresar numeros hasta que se el numero cargado sea negativo e impar. Si el numero es menor a 100 ir sumando, si el numero es mayor o igual a 100 ir contando. Emitir los resultados por pantalla.
int i = 0; int j = 0; System.out.println("Ingresar numeros hasta que se ingrese uno negativo e impar."); System.out.println("Si el numero es menor a 100 ir sumando, si el numero es mayor o igual a 100 ir contando"); System.out.println(""); while(i >= 0 && i % 2 == 0){ i = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un numero:")); if (i < 100) { j = j + i; } else { j++; } }