Round down a int number in c++


How can I round down an int number in c++?

What I want to do is basically round down a number, for instance I know that the my numbers are always going to be 5 digit long, but I want them to be rounded down as follow.

If----------Round down to
25335 = 25000
26458 = 26000
50465 = 50000

I tried floor(value) but I think this is just for floats.

How do I do this in c++?

Thanks a lot
add 500
divide by 1000
multiply by 1000
kbw --> This is for rounding, not rounding down,

just divide by 1000 and multiply by 1000
You guys are awesome! Thanks a lot. I'm always amazed about how quick you guys find the solution.

Anomen - That's exactly what I found out after trying what kbw suggested, thank you for clarifying this.

Thanks a lot
Topic archived. No new replies allowed.