Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Last active March 3, 2022 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save samueltcsantos/8cd3d46f5769e2c084cae39f08fd6f45 to your computer and use it in GitHub Desktop.
Save samueltcsantos/8cd3d46f5769e2c084cae39f08fd6f45 to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
var numero1 int
var numero2 int
fmt.Print("Digite o primeiro número: ")
fmt.Scan(&numero1)
fmt.Print("Digite o segundo número: ")
fmt.Scan(&numero2)
if numero1 > numero2 {
fmt.Println("O maior é ", numero1)
} else {
fmt.Println("O maior é ", numero2)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment