Data update
This commit is contained in:
parent
4924dd0264
commit
cb74b7914d
10 changed files with 60 additions and 11 deletions
13
Task/Function-definition/Tcl/function-definition-3.tcl
Normal file
13
Task/Function-definition/Tcl/function-definition-3.tcl
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
proc multiply { a b args } {
|
||||
|
||||
set product 1
|
||||
|
||||
foreach m [list $a $b {*}$args] {
|
||||
|
||||
set product [expr {$product * $m}]
|
||||
}
|
||||
|
||||
return $product
|
||||
}
|
||||
|
||||
puts stdout [multiply 3 4 7 9 -2 -5 ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue