Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
14
Task/Arithmetic-Integer/Erlang/arithmetic-integer.erl
Normal file
14
Task/Arithmetic-Integer/Erlang/arithmetic-integer.erl
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
% 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.
|
||||
Loading…
Add table
Add a link
Reference in a new issue