Skip to content

Commit

Permalink
factorial implementation in tr-lang
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiserthe13th committed Oct 23, 2021
1 parent 9ee76a9 commit ac04a2b
Show file tree
Hide file tree
Showing 2 changed files with 122 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tests/factorial.gnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
-* unsanitized factorial implementation in tr-lang *-

-* 1 factorial *-
1 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "1! = " de de "\n" de

-* 2 factorial *-
2 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "2! = " de de "\n" de

-* 3 factorial *-
3 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "3! = " de de "\n" de

-* 4 factorial *-
4 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "4! = " de de "\n" de

-* 5 factorial *-
5 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "5! = " de de "\n" de

-* 100 factorial *-
100 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "100! = " de de "\n" de
61 changes: 61 additions & 0 deletions tests/faktoriyel.gnd
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
-* tr-lang'da sterilize edilmemiş faktoriyel implementasyonu *-

-* 1 factorial *-
1 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "1! = " de de "\n" de

-* 2 factorial *-
2 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "2! = " de de "\n" de

-* 3 factorial *-
3 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "3! = " de de "\n" de

-* 4 factorial *-
4 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "4! = " de de "\n" de

-* 5 factorial *-
5 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "5! = " de de "\n" de

-* 100 factorial *-
100 kpy 1-kpy dön *tks
kpy 0 > ise
:. kpy 1 > iken
1-kpy dön *tks
son at
yoksa
at 1
son "100! = " de de "\n" de

0 comments on commit ac04a2b

Please sign in to comment.