# Android QuestionRouns2 Question

#### grant1842

##### Active Member
I am doing some math.

B4X:
``````Sub btCalc_Click

'468= half wavelength
'234 quarter wave length

Dim  num1 = 234 As Float  'wavelength
Dim  num2 = 7.200 As Float 'frequency

Result = num1 / num2 '32.5
Result2 = Result * 10 '3.25
sum = (Result2 + Result)
edResult.Text= Round2(sum,2)

End Sub``````
The sum = 357.5
I need to format the sum to look like 35.75

#### HotShoe

##### Well-Known Member
Why do you multiply Result by 10? that makes it 325 instead of 32.5. Maybe you meant to divide by 10?

--- Jem

• NJDude

#### grant1842

##### Active Member
The multiply is correct . I just need to round the sum to display correctly.

#### HotShoe

##### Well-Known Member
Then you'd need to multiply by .10

Round2 won't help with converting a number, only with the number of decimal places to display.

--- Jem

• Peter Simpson and NJDude

#### klaus

##### Expert
Result2 = Result * 10 '3.25 ???
as HotShoe said, you need to divide by 10.
To display the sum correctly use:
B4X:
``edResult.Text= NumberFormat(sum, 1, 2)``

• Peter Simpson