java division and decimal error
i had a problem with my calculation..below is a sample of my code
double ggg = 170000.0 * (1.0 + (10.0/100) );
System.out.println("total :" + ggg );
i was trying to calculate the certain percentage based on the user input value but I got this kind of weird math error...
the expected result should b total : 187,000.0
but the actual result is total : 187,000.00000000003 <----
can help me explain why there is a decimal value is involved?? and how shall I get rid of it ?
Thanks in advance :)