你好,我有一個問題,我搜查,但我沒有找到解決 你能幫助我,請語法錯誤:?意外celsfah,期待(
if choix != 1 && choix != 2 {
fmt.Println("you don't put a correct number!")
continueProg=true
} else if choix == 1 {
celsfah()
fmt.Println("Celsius")
} else {
//FahCels()
fmt.Println("Fahrenheit")
}
我嘗試了幾種解決方案,但沒有工作
的功能Celsfah
func celsfah(fahrenheit) {
celsius := 0
fahrenheit := 0
fmt.Println("Entrer une température en Celsius à convertir en Fahrenheit : ")
fmt.Scanln(&celsius)
fahrenheit = celsius*1.8+32
fmt.Println(&fahrenheit)
}
份額的值你的'celsfah()'func請。 – Elad
請編輯問題,而不是留下評論。 –