Factorial in Objeck

Example for versions Objeck 2.0.3

This example uses built-in Factorial() function.

bundle Default {
    class Factorial {
        function : Main(args : String[]) ~ Nil {
            for (i := 0; i <= 16; i += 1;) {
                i->Print();
                "! = "->Print();
                i->Factorial()->PrintLine();
            };
        }
    }
}