%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.
%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.