blob: 162f5827fce81636a28dc72b113357b522d3369e [file] [log] [blame]
#!/bin/tclsh
proc fib {n} {
set a 0
set b 1
while {$n > 0} {
set tmp $a
set a [expr $a + $b]
set b $tmp
incr n -1
}
return $a
}