Fixed incorrect division results
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user