Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,20 +0,0 @@
|
|||
function Get-HailStone {
|
||||
param($n)
|
||||
|
||||
switch($n) {
|
||||
1 {$n;return}
|
||||
{$n % 2 -eq 0} {$n; return Get-Hailstone ($n = $n / 2)}
|
||||
{$n % 2 -ne 0} {$n; return Get-Hailstone ($n = ($n * 3) +1)}
|
||||
}
|
||||
}
|
||||
|
||||
function Get-HailStoneBelowLimit {
|
||||
param($UpperLimit)
|
||||
|
||||
for ($i = 1; $i -lt $UpperLimit; $i++) {
|
||||
[pscustomobject]@{
|
||||
'Number' = $i
|
||||
'Count' = (Get-HailStone $i).count
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue