2024-07-06 11:06:39 +00:00
|
|
|
main() {
|
|
|
|
x := 1000
|
2024-07-28 16:47:13 +00:00
|
|
|
result := div10(x) / 10 + div(x, 100) * 4 - 40 - x + x
|
|
|
|
assert result == 10
|
2024-07-06 11:06:39 +00:00
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
div(x Int, y Int) -> Int {
|
2024-07-06 11:06:39 +00:00
|
|
|
return x / y
|
|
|
|
}
|
|
|
|
|
2024-08-05 16:47:24 +00:00
|
|
|
div10(x Int) -> Int {
|
2024-07-06 11:06:39 +00:00
|
|
|
return x / 10
|
|
|
|
}
|