Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"fmt"
)
func main() {
var numero float32
fmt.Print("Digite um numero: ")
fmt.Scan(&numero)
if numero == 0 {
fmt.Println(numero, " é zero")
} else if numero > 0 {
fmt.Println(numero, " é positivo")
} else {
fmt.Println(numero, " é negativo")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment