Aug 11, 2017 07:04 PM
(This post was last modified: Aug 13, 2017 01:40 PM by Travelers.)
Hey everyone.
Today I coded the Shitty Square Root Finder. I'm taking an intro to Physics class and for some reason I decided to make. Not really sure how the two correlate, but I was studying for that when I made this.
We use the System.Math class to pass advanced mathematical operations through PowerShell. PowerShell itself can handle arithmetic operations, but anything more advanced will require the Math Class. Here is the link to the technical documentation from Microsoft, for those interested.
https://msdn.microsoft.com/en-us/library....110).aspx
Today I coded the Shitty Square Root Finder. I'm taking an intro to Physics class and for some reason I decided to make. Not really sure how the two correlate, but I was studying for that when I made this.
Code
# all this does is find the square root. That's it
# change title
$host.ui.RawUI.WindowTitle = "Shitty Square Root Finder"
# define variables
# get input from user
Write-Host "Hello, and welcome to the shitty square root calculator!"
$number = Read-host -Prompt "What number do you want to find the square root of: "
# use system.math to solve problems great than basi arithmetic
# use SQRT to find square root
[math]::Sqrt($number)We use the System.Math class to pass advanced mathematical operations through PowerShell. PowerShell itself can handle arithmetic operations, but anything more advanced will require the Math Class. Here is the link to the technical documentation from Microsoft, for those interested.
https://msdn.microsoft.com/en-us/library....110).aspx


![[Image: pia_banner_3.png]](https://www.privateinternetaccess.com/affiliates/banners/pia_banner_3.png)