Initial Commit
- initial default booting image
This commit is contained in:
11
support/testing/tests/package/test_tcl/rootfs-overlay/root/factorial.tcl
Executable file
11
support/testing/tests/package/test_tcl/rootfs-overlay/root/factorial.tcl
Executable file
@@ -0,0 +1,11 @@
|
||||
#! /usr/bin/env tclsh
|
||||
|
||||
proc factorial {n} {
|
||||
set f 1
|
||||
for {set i 1} {$i <= $n} {incr i} {
|
||||
set f [expr {$f * $i}]
|
||||
}
|
||||
return $f
|
||||
}
|
||||
|
||||
puts [factorial [lindex $argv 0]]
|
||||
Reference in New Issue
Block a user