Sha256: 8f683ca61b4f26d739d2e7a0311164c5f370d461b39de4f0c19cccd96eb2613b
Contents?: true
Size: 463 Bytes
Versions: 10
Compression:
Stored size: 463 Bytes
Contents
% Implemented by Arjun Sunel -module(arith). -export([start/0]). start() -> case io:fread("","~d~d") of {ok, [A,B]} -> io:format("Sum = ~w~n",[A+B]), io:format("Difference = ~w~n",[A-B]), io:format("Product = ~w~n",[A*B]), io:format("Quotient = ~w~n",[A div B]), % truncates towards zero io:format("Remainder= ~w~n",[A rem B]), % same sign as the first operand halt() end.
Version data entries
10 entries across 7 versions & 1 rubygems