Hello I just started using small basic and there is a simple program that I compiled but something is wrong.
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
the answer is always zero. when I try to set a number to "Total" then It works Eg.
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