30 lines
299 B
Plaintext
30 lines
299 B
Plaintext
|
main() {
|
||
|
number(10)
|
||
|
register(10)
|
||
|
}
|
||
|
|
||
|
number(x int) {
|
||
|
y := x
|
||
|
x -= 1
|
||
|
assert x < y
|
||
|
x += 1
|
||
|
assert x == y
|
||
|
x *= 2
|
||
|
assert x > y
|
||
|
x /= 2
|
||
|
assert x == y
|
||
|
}
|
||
|
|
||
|
register(x int) {
|
||
|
y := x
|
||
|
num := 1
|
||
|
x -= num
|
||
|
assert x < y
|
||
|
x += num
|
||
|
assert x == y
|
||
|
num = 2
|
||
|
x *= num
|
||
|
assert x > y
|
||
|
x /= num
|
||
|
assert x == y
|
||
|
}
|