Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Round Numbers with PowerShell

$
0
0

Summary: Easily use Windows PowerShell to round numbers.

Hey, Scripting Guy! Question How can I use Windows PowerShell to easily round numbers?

Hey, Scripting Guy! Answer Use the Round static method from the System.Math class, for example:

PS C:\> 22/7

3.14285714285714

PS C:\> [math]::Round(22/7)

3

PS C:\> 


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>