set a 0 while 1 { switch [gets stdin] {i {incr a} s {set a [expr {$a*$a}]} d {if {$a>0} {incr a -1}} o {puts $a} h {exit}} if {$a==256} {set a 0} }
Note that non-ascii characters in the above source code will be escaped (such as \x9f).
download
return to the top page