package main
import "fmt"
func main() {
var num int
fmt.Scan(&num)
fmt.Println(MakeNegative(num))
}
func MakeNegative(x int) int {
if x < 0 {
return x
} else if x > 0 {
return -x
}
return 0
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.