Fixed incorrect division results

This commit is contained in:
2025-02-22 12:54:23 +01:00
parent 7598411c8f
commit c088697446
11 changed files with 150 additions and 94 deletions

View File

@ -1,13 +1,11 @@
main() {
quotient := 0
remainder := 0
dividend := 256
divisor := 100
quotient, remainder = 256 / 100
quotient, remainder := 256 / 100
assert quotient == 2
assert remainder == 56
quotient, remainder = dividend / 100
assert quotient == 2
assert remainder == 56
@ -15,7 +13,7 @@ main() {
quotient, remainder = 256 / divisor
assert quotient == 2
assert remainder == 56
quotient, remainder = dividend / divisor
assert quotient == 2
assert remainder == 56