Temperature Converter
Convert Celsius to Fahrenheit using variables and Printf.
package main
import "fmt"
func main() {
celsius := 30.0
fahrenheit := celsius*9/5 + 32
fmt.Printf("%.1f°C = %.1f°F\n", celsius, fahrenheit)
}Convert Celsius to Fahrenheit using variables and Printf.
package main
import "fmt"
func main() {
celsius := 30.0
fahrenheit := celsius*9/5 + 32
fmt.Printf("%.1f°C = %.1f°F\n", celsius, fahrenheit)
}Copy the code above and paste to run