Skip to content

Latest commit

 

History

History
11 lines (7 loc) · 217 Bytes

Opposite number.md

File metadata and controls

11 lines (7 loc) · 217 Bytes

Very simple, given a number, find its opposite.

Examples:

1: -1
14: -14
-34: 34

But can you do it in 1 line of code and without any conditionals?

solution