Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Last active March 3, 2022 12:48
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/69abfe4d4337c13ea96f009dba61d4f9 to your computer and use it in GitHub Desktop.
Save samueltcsantos/69abfe4d4337c13ea96f009dba61d4f9 to your computer and use it in GitHub Desktop.
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