Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Arithmetic-Integer/Seed7/arithmetic-integer.seed7
Normal file
20
Task/Arithmetic-Integer/Seed7/arithmetic-integer.seed7
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
$ include "seed7_05.s7i";
|
||||
|
||||
const proc: main is func
|
||||
local
|
||||
var integer: a is 0;
|
||||
var integer: b is 0;
|
||||
begin
|
||||
write("a = ");
|
||||
readln(a);
|
||||
write("b = ");
|
||||
readln(b);
|
||||
|
||||
writeln("a + b = " <& a + b);
|
||||
writeln("a - b = " <& a - b);
|
||||
writeln("a * b = " <& a * b);
|
||||
writeln("a div b = " <& a div b); # Rounds towards zero
|
||||
writeln("a rem b = " <& a rem b); # Sign of the first operand
|
||||
writeln("a mdiv b = " <& a mdiv b); # Rounds towards negative infinity
|
||||
writeln("a mod b = " <& a mod b); # Sign of the second operand
|
||||
end func;
|
||||
Loading…
Add table
Add a link
Reference in a new issue