Jump to content


This topic is now archived and is closed to further replies.


Rounding Up

Recommended Posts


I am writing code for CPU Speed detection, and then inserts it into a MySQL DB.  I have finished this part.

What I need help with:

I need to look at my speed variable, which will be something like 500, 800, or 3000.
For example, if the CPUspeed variable is set to 1700, I want it to be modified to 1800.  If its 1800, then leave it alone (or modify to 1800).  If its 1690, I want it to be 1600.
If its 3000, I want it to be 3000.  If its 3110, I want it to be 3200.

I just need it for the number, I do the Mhz and Ghz distinction later.


Share this post

Link to post
Share on other sites
This topic is now closed to further replies.


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.