嘿!我目前正在学习 go lang,我正在对我的概念做一些基本的笔记,尽管我也只是将它们发布在这里。它们没有经过深思熟虑或写得很好,但只是我时不时做笔记以供参考。
我正在参加 maximilian schwarzmüller 的 udemy 课程,
func calculatefuturevalue(investmentamount, expectedreturn, years float64) (fv float64, rfv float64) { fv = (investmentamount) * math.pow(1+expectedreturn/100, float64(years)) rfv = fv / math.pow(1+inflationrate/100, years) return }
go mod init example.com/bank
wantscheckbalance := choice == 1
if choice == 1 || choice == 2 { }
if choice == 1 { fmt.println("your balance is", accountbalance) } else if choice == 2 { }
accountBalance += depositAmount //which equals to accountBalance = accountBalance + depositAmount