GO Lang Program to find biggest of two numbers
Program
package main
import "fmt"
func main(){
var a int
var b int
fmt.Println("Enter value of a")
fmt.Scan(&a)
fmt.Println("Enter value of b")
fmt.Scan(&b)
if a > b {
fmt.Println("a is greater")
} else {
fmt.Println("b is greater")
}
}
Output 1
$ go build biggest-of-two-numbers.go
$ ./biggest-of-two-numbers
Enter value of a
12
Enter value of b
67
b is greater
Output 2
$ go build biggest-of-two-numbers.go
$ ./biggest-of-two-numbers
Enter value of a
83
Enter value of b
29
a is greater