
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Please how can I get the number of digits after a decimal point.
for example:
int a = 3446.64643231;
how can I get the number of digits after the decimal point which is 8 in this example.
Thanks for the help.
a is an integer.
a= 3446 , so there will be no decimal point and no digits after it.
I don't see that there is any way to get the number of digits for a floating point number. The only way would be if it is input as a string.
Why do you need this? Please show an example of how it would be useful.
Please how can I get the number of digits after a decimal point.
for example:
double a = 3446.64643231;
how can I get the number of digits after the decimal point which is 8 in this example.
Thanks for the help.
Please how can I get the number of digits after a decimal point.
I see that you have deleted your original post and now declare a as a double.
Doesn't make any difference as I cannot see how it can be done reliably.
Please answer my previous question.
Why do you need this? Please show an example of how it would be useful.