0
안녕하세요 저는 작은 기본 언어를 사용하기 시작했으며 컴파일 된 간단한 프로그램이 있지만 뭔가 잘못되었습니다.스몰 베이직 : 내가 뭘 잘못 했니?
Total = ((Loan*Loanp/100)+Expense)-Salary
TextWindow.WriteLine("Your Loan: ")
Loan = TextWindow.ReadNumber()
TextWindow.WriteLine ("Your Loan %: ")
TextWindow.ReadNumber(Loanp)
TextWindow.WriteLine ("Your Expense: ")
Expense = TextWindow.ReadNumber()
TextWindow.WriteLine ("Your Salary: ")
Salary = TextWindow.ReadNumber()
If (Loan*Loanp/100)+Expense > Salary Then
TextWindow.WriteLine ("Error : You are FOREVER in loan")
Else
TextWindow.WriteLine ("You savings are "+Total)
EndIf
답변은 항상 0입니다. 숫자를 "Total"로 설정하려고하면 작동합니다. 예 :
Total = 100*3/100+50
TextWindow.WriteLine("Your Loan: ")
Loan = TextWindow.ReadNumber()
TextWindow.WriteLine ("Your Loan %: ")
TextWindow.ReadNumber(Loanp)
TextWindow.WriteLine ("Your Expense: ")
Expense = TextWindow.ReadNumber()
TextWindow.WriteLine ("Your Salary: ")
Salary = TextWindow.ReadNumber()
If (Loan*Loanp/100)+Expense > Salary Then
TextWindow.WriteLine ("Error : You are FOREVER in loan")
Else
TextWindow.WriteLine ("You savings are "+Total)
EndIf
반갑습니다. 도움이 되었다면 답을 수락하십시오. – Gian
나는 미안 투표를하지 않았다 (평판이 15 점 미만) – user2433191