Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
package main
import (
"fmt"
"math"
)
func main() {
var numero float64
fmt.Print("Digite um número: ")
fmt.Scan(&numero)
if numero - math.Round(numero) != 0 {
fmt.Println("Decimal")
} else {
fmt.Println("Inteiro")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment