Round a number to the nearest 10's position


hello,

does know of trick or built-in math function round whole numbers nearest 10's position?  wmi queries tend return data not want.  example processor speed of 2202...i want round down 2200 or 2399...i want round 2400.

the [system.math]::round function works decimals...but need whole numbers.  or @ least not using correctly whole numbers, cannot work needs.

thanks in advance

nelson

don’t forget mod!
 
$num = 2202
 
$num - ($num % 10)
 
the mod operator (%) shows remainder so  can figure out how
much remove nearest unit
 
 

justin rich
http://jrich523.wordpress.com
powershell v3 guide (technet)
please remember mark replies answers if , unmark them if provide no help.


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2