Sum numbers with accuracy

Hello! I use:
Sum = (CInt(sum1)+cint(sum2)).ToString
I sum 12.23 +101.06
I need: sum = 113.29
But I take: 113
How add accuracy?

Hi,

Can you use CDbl instead of CInt?

Regards,

1 Like

Sum = (DCbl(sum1) + CDbl(sum2)).ToString

1 Like

Also this:
Now I get 113.29 and I need 113.29*1.3 = 147.277
I need : 147.28

Hi,

The following will round the value.

System.Math.Round(113.29*1.3,2)

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.