모듈 소스
%rome.erl
-module(rome).
-export([rome/3]).

rome(99, L, A) -> "exit";
rome(0, L, A) -> L;
rome(Number, L, A) ->
    case Number > 10 of
	true ->
	    rome(Number-10, "X "++L, A);
	false ->
	    rome(0, L++" "++element(Number rem 11, A), A)
    end.

콘솔
A = {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X"}.
c(rome).
rome:rome(38, "", A).

로마숫자바꾸기, LittleAOI
Retrieved from http://wiki.zeropage.org/wiki.php/로마숫자바꾸기/DamienRice
last modified 2021-02-07 05:29:22