Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
10
Task/Arithmetic-Integer/XPL0/arithmetic-integer.xpl0
Normal file
10
Task/Arithmetic-Integer/XPL0/arithmetic-integer.xpl0
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
include c:\cxpl\codes;
|
||||
int A, B;
|
||||
[A:= IntIn(0);
|
||||
B:= IntIn(0);
|
||||
IntOut(0, A+B); CrLf(0);
|
||||
IntOut(0, A-B); CrLf(0);
|
||||
IntOut(0, A*B); CrLf(0);
|
||||
IntOut(0, A/B); CrLf(0); \truncates toward zero
|
||||
IntOut(0, rem(0)); CrLf(0); \remainder's sign matches first operand (A)
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue