proc gcd {a b} {if{$b>$a} {set t $bset b $aset a $t}while{$b!=0} {set t $bset b [expr{$a%$b}]set a $t}return$a}proc lcm {a b} {set g [gcd $a $b]return[expr{$g* ($a/$g) * ($b/$g)}]}set result 1for{set i 1} {$i<=20} {incr i} {set result [lcm $result $i]}puts$result