Implemented numbers with different bases
This commit is contained in:
parent
0e999cae92
commit
6d77a8a120
11 changed files with 165 additions and 12 deletions
22
tests/programs/div-split.q
Normal file
22
tests/programs/div-split.q
Normal file
|
@ -0,0 +1,22 @@
|
|||
main() {
|
||||
quotient := 0
|
||||
remainder := 0
|
||||
dividend := 256
|
||||
divisor := 100
|
||||
|
||||
quotient, remainder = 256 / 100
|
||||
assert quotient == 2
|
||||
assert remainder == 56
|
||||
|
||||
quotient, remainder = dividend / 100
|
||||
assert quotient == 2
|
||||
assert remainder == 56
|
||||
|
||||
quotient, remainder = 256 / divisor
|
||||
assert quotient == 2
|
||||
assert remainder == 56
|
||||
|
||||
quotient, remainder = dividend / divisor
|
||||
assert quotient == 2
|
||||
assert remainder == 56
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue