/**
package loop.
*/
package ru.job4j.loop;
/**
class Factorial.
*/
public class Factorial {
  /**
  @param n - for Factorial
  @return factorial of a non-negative integer n, denoted by n!,
  is the product of all positive integers less than or equal to n.
  */
  public int calc(int n) {
    int factResult = 1;
    if (n == 0) {
      return 1;
    } else {
        for (int i = 1; i <= n; i++) {
            factResult *= i;
        }
      }
      return factResult;
    }
}

@@ -310,55 +310,8 @@
  1;%0A
-    if (n == 0) %7B%0A      return 1;%0A    %7D else %7B%0A
     
@@ -384,24 +384,16 @@
       %7D%0A
-      %7D%0A
       re

Repair Factorial#1