# Android QuestionRouns2 Question

#### grant1842

##### Active Member
Longtime User
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
Longtime User
Why do you multiply Result by 10? that makes it 325 instead of 32.5. Maybe you meant to divide by 10?

--- Jem

#### grant1842

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

#### HotShoe

##### Well-Known Member
Longtime User
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

#### klaus

##### Expert
Longtime User
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)``

#### grant1842

##### Active Member
Longtime User
Thanks Hotshoe that will do the trick

#### grant1842

##### Active Member
Longtime User
Thanks Klaus

Android Question In App Purchase question
Replies
4
Views
653
Replies
10
Views
5K
Replies
24
Views
57K
Replies
36
Views
105K
Replies
138
Views
137K