Need help with calculating a formula
Hello mpgh members.
The question that is frustrating me is that I try to solve a math formula in visual basic but it simply won't come on the right answer!
I do not know what I am doing wrong.
As an example of what I am trying to do is the following thing: textbox1.text * 60 - textbox2.text / 60 . so what I mean is(5 * 60 - 15 / 60 = 4.75) But I come at 299.75
I am using the following code:
I hope someone can help me!
The question that is frustrating me is that I try to solve a math formula in visual basic but it simply won't come on the right answer!
I do not know what I am doing wrong.
As an example of what I am trying to do is the following thing: textbox1.text * 60 - textbox2.text / 60 . so what I mean is(5 * 60 - 15 / 60 = 4.75) But I come at 299.75
I am using the following code:
Code:
Dim i, j, answer As Single
i = textbox1.Text
j = textbox2.Text
answer = i * 60 - j / 60
Label1.Text = answer

