구구단을 scheme으로 만든 프로그램



음... 굉장히 괄호 사용이 많은 언어군요... 이런 언어 싫어하는데...ㅠ.ㅠ

~cpp 
( define (gugudan x y)
   (begin (when (> x 9) (exit) )
   (when (> y 9) (begin (gugudan (+ x 1) (- y 9)) (exit) ))
   (print x) (write 'x) (print y) (write '=) (print (* x y)) (newline)
   (gugudan x (+ y 1))
   (exit)
))

(gugudan 2 1)


Retrieved from http://wiki.zeropage.org/wiki.php/구구단/유상욱-Scheme
last modified 2021-02-07 05:28:44