Hello friends. can anyone help me with the below problem.
8.888888 expected op 8.88
8.88 expected op 8.88
8.8 expected op 8.80
8 expected op 8.00
Thanks in advance.
Hello friends. can anyone help me with the below problem.
8.888888 expected op 8.88
8.88 expected op 8.88
8.8 expected op 8.80
8 expected op 8.00
Thanks in advance.
Assign Activity:
originalNumber = 8.33
Assign Activity:
roundedNumber = Math.Round(originalNumber, 2)
@Gayathri_Mk
Please help with this
eg i have number=8.88888
Expected output=8.88
The above solution is rounding off the number it is giving 8.89 but i need 8.88
We are some parts critical on String Acrobatics for number parsing. But as we can enhance the approach we can start with
HarmonizedNumber =
CDbl(System.Text.RegularExpressions.Regex.Match(YourInputString,"\d+(\.\d{1,2})?").Value).toString("F2")
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.