Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Shell 

[PowerShell] Shitty Square Root Finder

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.

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]


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by samir5000Mar 13, 2025 01:32 PM 3 328 Mar 13, 2025 01:32 PM
Last Post: Bastille
[Shell] by PELockDec 9, 2024 09:42 AM 3 661 Dec 9, 2024 09:42 AM
Last Post: PELock
[Source] by QismonNov 27, 2024 04:29 AM 2 308 Nov 27, 2024 04:29 AM
Last Post: mikeyp