Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,3 +0,0 @@
|
|||
function Get-Sum ($a) {
|
||||
return ($a | Measure-Object -Sum).Sum
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
function Get-Product ($a) {
|
||||
if ($a.Length -eq 0) {
|
||||
return 0
|
||||
}
|
||||
$s = $a -join '*'
|
||||
return (Invoke-Expression $s)
|
||||
}
|
||||
|
|
@ -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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue