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