diff -r d59bcff69998 -r b5b1bc0a603b solution/cw5/sqr.fun --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/solution/cw5/sqr.fun Wed Dec 15 19:00:01 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