Skip to content

Instantly share code, notes, and snippets.

@samueltcsantos
Last active February 28, 2022 21:42
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/e6ace5a957db48af0f31de595e8f1eef to your computer and use it in GitHub Desktop.
Save samueltcsantos/e6ace5a957db48af0f31de595e8f1eef to your computer and use it in GitHub Desktop.
Converter Fahrenheit para Celsius em Go.
package main
import (
"fmt"
)
func main() {
var fahrenheit, celsius float32
fmt.Print("Temperatura em Fahrenheit? ")
fmt.Scan(&fahrenheit)
celsius = 5 * ((fahrenheit - 32)/9)
fmt.Println(celsius, " Celsius")
}
@samueltcsantos
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment