Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
15
Task/Arithmetic-Integer/GAP/arithmetic-integer.gap
Normal file
15
Task/Arithmetic-Integer/GAP/arithmetic-integer.gap
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
run := function()
|
||||
local a, b, f;
|
||||
f := InputTextUser();
|
||||
Print("a =\n");
|
||||
a := Int(Chomp(ReadLine(f)));
|
||||
Print("b =\n");
|
||||
b := Int(Chomp(ReadLine(f)));
|
||||
Display(Concatenation(String(a), " + ", String(b), " = ", String(a + b)));
|
||||
Display(Concatenation(String(a), " - ", String(b), " = ", String(a - b)));
|
||||
Display(Concatenation(String(a), " * ", String(b), " = ", String(a * b)));
|
||||
Display(Concatenation(String(a), " / ", String(b), " = ", String(QuoInt(a, b)))); # toward 0
|
||||
Display(Concatenation(String(a), " mod ", String(b), " = ", String(RemInt(a, b)))); # nonnegative
|
||||
Display(Concatenation(String(a), " ^ ", String(b), " = ", String(a ^ b)));
|
||||
CloseStream(f);
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue