Day of the Week by 51b(date)

-module(d).
-export([m/0]).
m()->case io:fread('',"~d~d~d")of{_,[Y,M,D]}->io:write(calendar:day_of_the_week(Y,M,D)rem 7),io:nl(),m();_->0end.

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page