I came to a part in my java program where I need to round up to the nearest hundred and thought that there was probably some way to do it but I guess not. So I searched the net for examples or any answers and I've yet to find any since all examples appear to be to the nearest hundred. I just want to do this and round UP. Maybe there's some simple solution that I'm overlooking. I have tried Math.ceil
and other functions but have not found an answer as of yet. If anyone could help me with this issue I would greatly appreciate it.
If my number is 203, I want the result rounded to be 300. You get the point.
- 801->900
- 99->100
- 14->100
- 452->500