Click here to Skip to main content
15,895,667 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i want to
interger number convert indian currency with decimal amountlakh,crore,thousand


e.g Example:-

Interger number amount :- 7854785

Thousands :- 7854.785

Lakhs :- 78.54785

What I have tried:

i want to <pre>interger number convert indian currency with decimal 
 lakh,crore,thousand
Posted
Updated 16-May-18 21:08pm
v2

The simplest solution is use division;
C#
double result = (double)7854785 / (double)1000 // result = 7854.785
double result = (double)7854785 / (double)100000 // result = 78.54785


When using division in C# the value will be returned based on the datatypes of the values - not the variable type, adding (double) prior to the values casts the values as double prior to performing the division

Kind Regards
 
Share this answer
 
Comments
Nishant.Chauhan80 17-May-18 3:21am    
thanku sir
 
Share this answer
 
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900