Last active
March 3, 2022 12:48
-
-
Save samueltcsantos/69abfe4d4337c13ea96f009dba61d4f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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