Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
19
Task/Arithmetic-Integer/Oz/arithmetic-integer.oz
Normal file
19
Task/Arithmetic-Integer/Oz/arithmetic-integer.oz
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
declare
|
||||
StdIn = {New class $ from Open.file Open.text end init(name:stdin)}
|
||||
|
||||
fun {ReadInt}
|
||||
{String.toInt {StdIn getS($)}}
|
||||
end
|
||||
|
||||
A = {ReadInt}
|
||||
B = {ReadInt}
|
||||
in
|
||||
{ForAll
|
||||
["A+B = "#A+B
|
||||
"A-B = "#A-B
|
||||
"A*B = "#A*B
|
||||
"A/B = "#A div B %% truncates towards 0
|
||||
"remainder "#A mod B %% has the same sign as A
|
||||
"A^B = "#{Pow A B}
|
||||
]
|
||||
System.showInfo}
|
||||
Loading…
Add table
Add a link
Reference in a new issue