Click here to Skip to main content
15,917,608 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have problems below:
a = 123456.789
b = 7
c = a/b --> the result is 17636.6841

But I want it to show 17636 (not rounding to 17637)

Can anyone help me please?

Thanks
Posted
Updated 22-Dec-09 23:10pm
v2

1 solution

double a = 123456.789;
double b = 7;
double c = Math.Floor(a / b);

:)
 
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