Data update

This commit is contained in:
Ingy döt Net 2026-02-01 16:33:20 -08:00
parent 5150844a7d
commit 4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions

View file

@ -1,3 +0,0 @@
function Get-Sum ($a) {
return ($a | Measure-Object -Sum).Sum
}

View file

@ -1,11 +0,0 @@
function Get-Product ($a) {
if ($a.Length -eq 0) {
return 0
} else {
$p = 1
foreach ($x in $a) {
$p *= $x
}
return $p
}
}

View file

@ -1,7 +0,0 @@
function Get-Product ($a) {
if ($a.Length -eq 0) {
return 0
}
$s = $a -join '*'
return (Invoke-Expression $s)
}

View file

@ -1,16 +0,0 @@
function Get-SumAndProduct ($a) {
$sum = 0
if ($a.Length -eq 0) {
$prod = 0
} else {
$prod = 1
foreach ($x in $a) {
$sum += $x
$prod *= $x
}
}
$ret = New-Object PSObject
$ret | Add-Member NoteProperty Sum $sum
$ret | Add-Member NoteProperty Product $prod
return $ret
}