下面实现一个判断奇偶性的函数,代码如下: -module(jiou). -compile(export_all). test(Num) -> if Num rem 2 == 0 -> io:format("ou shu~n"); true -> io:format("ji shu~n") end.