Help with trimming decimals..
807589Nov 29 2008 — edited Nov 30 2008Alright i'm gonna get straight to the point. I have the following variable to calculate percent:
double percent = numWritten / FileSize * 100.0;
the problem is that it gives me a long decimal such as 2.535698734087. how can i trim this to a decimal such as 2.5? Please do not link me to some other page, or anything like that. give me a direct awnser, or the code to do it, and i will give you all 10 duke stars. DO NOT give me a link to some help page. thanks.