mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-14 14:08:17 +02:00
Update list-pi.ps1
This commit is contained in:
parent
e17b81d653
commit
fdaa75ddfd
@ -4,7 +4,7 @@
|
||||
.DESCRIPTION
|
||||
This PowerShell script calculates and lists the digits of the mathematical constant PI.
|
||||
.PARAMETER digits
|
||||
Specifies the number of digits to list (10000 by default)
|
||||
Specifies the number of digits to list (1000 by default)
|
||||
.EXAMPLE
|
||||
PS> ./list-pi
|
||||
3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342...
|
||||
@ -14,7 +14,7 @@
|
||||
Author: Markus Fleschutz | License: CC0
|
||||
#>
|
||||
|
||||
param([int]$Digits = 10000)
|
||||
param([int]$Digits = 1000)
|
||||
|
||||
function List-Pi ( $Digits ) {
|
||||
$Big = [bigint[]](0..10)
|
||||
@ -62,6 +62,7 @@ function List-Pi ( $Digits ) {
|
||||
$r = $nr
|
||||
}
|
||||
}
|
||||
Write-Host "... ($Digits digits)"
|
||||
}
|
||||
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user