here is my source code for my program im trying to convert 10 units from furlong to meters the answer is supposed to be 2011.68 meters

i keep getting 2000. I know if i cant get this right the rest of the conversion will give the wrong answers anybody have any ideas?
Dim inch As Long
Dim fathom As Long
Dim foot As Long
Dim furlong As Long
Dim kilometer As Long
Dim meter As Long
Dim rod As Long
Dim miles As Long
Dim yard As Long
Dim Feet As Long
Dim Original As Long
Dim Desired As Long
Dim A(0 To 9) As Long
Dim B(0 To 9) As Long
Dim result As Long



Private Sub convertButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles convertButton.Click

Feet = Val(ConvertText.Text)
Original = Val(OUnitsTexT.Text)
Desired = Val(DUnitsText.Text)

inch = 0.0833 * Feet
yard = 3 * Feet
meter = 3.28155 * Feet
fathom = 6 * Feet
rod = 16.5 * Feet
furlong = 660 * Feet
kilometer = 3281.5 * Feet
miles = 5280 * Feet

A(1) = inch
A(2) = fathom
A(3) = foot
A(4) = furlong
A(5) = kilometer
A(6) = meter
A(7) = miles
A(8) = rod
A(9) = yard

B(1) = inch
B(2) = fathom
B(3) = Feet
B(4) = furlong
B(5) = kilometer
B(6) = meter
B(7) = miles
B(8) = rod
B(9) = yard

result = ((A(Original)) / ((B(Desired)) / Feet))

lengthText.Text = Val(result)
lengthText.Text = FormatNumber(result, 2, , , TriState.True)

The problem MIGHT be here.

result = ((A(Original)) / ((B(Desired)) / Feet))

Some languages (like C and C++) do integer division unless you explicitly make it do "normal" division. In other words, if you do 5/2 in C the result will be the integer 2, not the "floating point number" 2.5.

I just figured it out: It's simpler than that.

You are declaring all of your numeric variables a LONG. LONG is an integer data type: it does not store anything to the right of a decimal point.

Try using DOUBLE (or better, DECIMAL, if your version supports it) for any numbers you need to have values to the right of the decimal point.

It looks like there might be an error in your conversion calculation. Let's go through the code and see if we can find the issue.

First, let's examine this line of code:

```VB.NET
result = ((A(Original)) / ((B(Desired)) / Feet))
```

In this line, you are dividing the value of A(Original) by the value of B(Desired), and then dividing the result by the value of Feet. However, it seems like the order of operations might be incorrect. You should first divide A(Original) by B(Desired), and then multiply the result by Feet. Here's the corrected line of code:

```VB.NET
result = (A(Original) / B(Desired)) * Feet
```

This change ensures that the conversion is done correctly. Now let's see if there are any other issues in the code.

It seems like you have declared the variables `foot`, `Feet`, and `Original` but haven't assigned any values to them. Make sure to assign values to these variables as well.

Additionally, in the declaration of variables, `foot` is missing its data type. It should be declared as `Dim foot As Long`.

Lastly, you are assigning a value to `meter`, but you haven't calculated it correctly. The correct calculation for converting from feet to meters is to multiply the value in feet by 0.3048 (not 3.28155). Here's the corrected line of code for calculating `meter`:

```VB.NET
meter = 0.3048 * Feet
```

After making these changes, re-run your program and check if the conversion from furlong to meters now gives the correct answer.