Skip to content

Instantly share code, notes, and snippets.

@Bablzz
Last active Sep 18, 2019
Embed
What would you like to do?
Max digit without condition
package main
import (
"fmt"
"math"
)
func main() {
a := 32
b := -44
max := ( a + b + (int)(math.Abs(float64(a-b))))/2
fmt.Println("Max digit = ", max)
}
// output => Max digit = 32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment