@@ -0,0 +1,713 @@
+package JavaCourse.Modul_1.Task_4_2;%0A%0Apublic class Factorial%0A%7B%0A    private int value;%0A%0A    public Factorial(int value)%0A    %7B%0A        this.value = value;%0A    %7D%0A%0A    public static void main(String%5B%5D args)%0A    %7B%0A        Factorial factorial = new Factorial(Integer.valueOf(args%5B0%5D));%0A        System.out.println(String.format(%22Factorial of a given number is %25s%22,factorial.calculation()));%0A    %7D%0A%0A    public int calculation()%7B%0A        int result = 1;%0A        if (this.value == 0) %7B%0A            return result;%0A        %7D%0A        else%0A        %7B%0A            while (this.value != 0)%0A            %7B%0A                result *= this.value;%0A                this.value--;%0A            %7D%0A            return result;%0A        %7D%0A    %7D%0A%7D%0A

add task factorial