Advice: Learn to indent properly your code, it show its structure and it helps reading and understanding. It also helps spotting structures mistakes.
Scanner sc = new Scanner(System.in);
System.out.println("Ingrese un número");
numero = sc.nextInt();
for (i = 1; i <= numero; i++) {
if (number % 2 == 0 && number < 25) {
acum = acum * multiplo;
} else if (number > 16) {
impares = impares + i;
conti = conti + 1;
} else if (number % 4 == 0 && i <= numero) {
multiplos = multiplos + i;
cont = cont + 1;
}
prom = multiplos / cont;
System.out.println("El producto de todos los números pares menores a 25 es:" + acum);
System.out.println("La suma de todos los números impares mayores a 16 es:" + impares);
System.out.println("El promedio de todos números múltiplos de 4 es:" + prom);
}
}
Indentation style - Wikipedia[
^]
https://codebeautify.org/javaviewer[
^]
Best C++ Formatter and Beautifier[
^]
Online C/C++ Formatter, Indenter and Beautifier – Techie Delight[
^]
Professional programmer's editors have this feature and others ones such as parenthesis matching and syntax highlighting.
Notepad++ Home[
^]
ultraedit[
^]
Enabling Open Innovation & Collaboration | The Eclipse Foundation[
^]