diff options
author | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-12-23 17:10:36 +0100 |
---|---|---|
committer | Paweł Dybiec <pdybiec@stud.cs.uni.wroc.pl> | 2018-12-23 17:10:36 +0100 |
commit | a8a49e5b1f968d4ae160052a35242efc7ea30e30 (patch) | |
tree | e05b1314df984e1c3ebea212e77df96d76844ec8 /tests/pracownia4/pracownia3/024_fac.xi | |
parent | Start of regalloc (diff) |
Update tests
Diffstat (limited to 'tests/pracownia4/pracownia3/024_fac.xi')
-rw-r--r-- | tests/pracownia4/pracownia3/024_fac.xi | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/pracownia4/pracownia3/024_fac.xi b/tests/pracownia4/pracownia3/024_fac.xi new file mode 100644 index 0000000..381de7c --- /dev/null +++ b/tests/pracownia4/pracownia3/024_fac.xi @@ -0,0 +1,17 @@ +fac(x:int):int +{ + res:int = 1 + while (x > 0) { + res = x*res + x = x - 1 + } + return res +} + +main():int +{ + return fac(5) +} + +//@PRACOWNIA +//@out Exit code: 120 \ No newline at end of file |