@toudidel/Silnia
Java

No description

Files
  • Main.java
Main.java
public class Main {

    public static void main(String[] args) {

        Long wynik = silnia(5);

        System.out.println(wynik);
    }

    public static long silnia(long n) {
        if (n == 0) { return 1; }
        return silnia(n - 1) * n;
    }
}
java version "1.8.0_31" Java(TM) SE Runtime Environment (build 1.8.0_31-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)