How to write the below numbers into words like below sample in Flutter/dart.
- 1,64,023 in to 1.64 lac
- 2,34,12,456 to 2.34 cr
there should be only 2 digits after decimal.
How to write the below numbers into words like below sample in Flutter/dart.
there should be only 2 digits after decimal.
2
Answers
Userstanding :
#convertNumberToWords function takes in an integer number and returns a string that represents the number in words. If the number is greater than or equal to 10 million, the function returns the number divided by 10 million with two decimal places, followed by the string "cr".
If the number is greater than or equal to 100,000, the function returns the number divided by 100,000 with two decimal places, followed by the string "lac". If the number is less than 100,000, the function returns the number as a string.
You can follow:
Have a nice day…