for {set x 0} {$x<10} {incr x} { if {[expr $x%3] == 0} {set s ""} else {set s "not "} puts [format "%i is %smultiple of 3." $x $s] }