aqui mi version del código:
public class FactorialCalc {
public static void main(String[] args) {
calculaFactorial();
}
public static void calculaFactorial() {
for (int n = 1; n <= 10; n++) {
int factorial = 1;
for (int i = 1; i <= n; i++) {
factorial *= i;
}
System.out.println("El factorial de " + n + " es " + factorial);
}
}
}