changeset 856 | 23273e3a120f |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/cwtests/cw05/sqr.fun Fri Dec 03 21:56:55 2021 +0000 @@ -0,0 +1,12 @@ +val Max : Int = 10; + +def sqr(x: Int) : Int = x * x; + +def all(n: Int) : Void = { + if n <= Max + then { print_int(sqr(n)) ; new_line(); all(n + 1) } + else skip() +}; + +all(0) + \ No newline at end of file