|
|
 |
RE: FN-FORUM: .Net Simple(?) Maths Problem
date posted 8th February 2008 11:47
> Hopefully someone can give me an answer to what I imagine is a simple
> problem (if you know the answer) ;-)
>=20
> Basically I need to take an int and divide it by 10. However I need to
> round the answer up (not down) to the nearest whole number.
>=20
> Can anyone point me in the right direction please?
>=20
> P.s. I=C3=A2=E2=82=AC=E2=84=A2m using c# / .Net 2
(int)Math.Ceiling((double)i / 10.0)
Int / int =3D rounded int, must cast to a floating point first
HTH
D
|
 |
|