10 lines
125 B
Plaintext
Raw Normal View History

2024-07-28 13:42:51 +00:00
main() {
2024-07-31 13:24:21 +00:00
assert neg(-1) == 1
assert neg(1) == -1
assert neg(-256) == 256
assert neg(256) == -256
2024-07-28 13:42:51 +00:00
}
2024-07-31 13:24:21 +00:00
neg(x) {
2024-07-28 13:42:51 +00:00
return -x
}