03-12-2012, 03:36 PM
Well, it looks like what your program is doing is turning one of the 12.5's into an integer, which cannot contain a decimal. So it may be turning
12.5 + 12.5 = 24.5
Into
12.5 + 12 = 24.5.
So, You are going to need to check the following line of code:
To see if either Answer, Number, Or Val return integer variables, and if they do, they need to be changed to double variables.
12.5 + 12.5 = 24.5
Into
12.5 + 12 = 24.5.
So, You are going to need to check the following line of code:
Code:
Answer = Number + Val(txtMain.Text)
To see if either Answer, Number, Or Val return integer variables, and if they do, they need to be changed to double variables.