好久没学习erlang了,都快忘光了,今天开始,从新学习,好心人监督我啊。  

先写一个九九乘法表热身先: 

-module(test99).-export([fun99/0]).fun99(X, Y) when X >= 9, Y >= 9 ->io:format("~w * ~w = ~w~n", [X, Y, X * Y]);fun99(X, Y) when X > Y->io:format("~w * ~w = ~w ", [X, Y, X * Y]),fun99(X, Y + 1);fun99(X, Y) when X =< Y->io:format("~w * ~w = ~w~n", [X, Y, X * Y]),fun99(X + 1, 1).fun99() ->fun99(1, 1).