for(int i = 1; i <= 100; i++){ if(i % 2 == 0 i % 3 ==0 ){ System.out.println(i); } } -…
Jump to turn (19)
- 1for(int i = 1; i <= 100; i++){ if(i % 2 == 0 || i % 3 ==0 ){ System.out.println(
- 2for(int i = 1; i <= 100; i++){ if(i % 2 == 0 || i % 3 ==0 ){ System.out.print(i
- 3utiliza substring para remover
- 4for(int i = 1; i <= 100; i++){ if(i % 2 == 0 || i % 3 ==0 ){ System.out.print((i
- 5sis eso StringBuilder
- 6String resultado = ""; for(int i = 1; i <= 100; i++){ if(i % 2 == 0 || i % 3 ==0
- 7int numero = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un número: ")
- 8sin usar un metodo
- 9int numero = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un número: ")
- 10int numero = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un número: ")
- 11int numero = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un número: ")
- 12int numero = Integer.parseInt(JOptionPane.showInputDialog("Ingrese un número: ")
- 13sin boolean
- 14ok
- 15estoy usando netbeans y me sale error en - public static double calcularPromedio
- 16public static double calcularPromedio(double[] array) { double sumTotal = 0; for
- 17esta dentro de un main public static void main(String[] args) {
- 18//6 int numAlumn = Integer.parseInt(JOptionPane.showInputDialog("Ingrese numero
- 19public static double calcularPromedio(double[] array) { //FUNCION con PARAMETRO
- User
for(int i = 1; i <= 100; i++){ if(i % 2 == 0 || i % 3 ==0 ){ System.out.println(i); } } - esto muestra los numeros divisibles entre 2 y tres pero no quiero que muestre con un salto de linea si no : 1, 2, 3 - como lo haria
- Assistant