# Looping with for
# While x is less than 11 print out the value of x
for {set x 1} {$x < 11} {incr x} {
puts "x = $x"
}

#x = 1
#x = 2
#x = 3
#x = 4
#x = 5
#x = 6
#x = 7
#x = 8
#x = 9
#x = 10

Discover more from Tips and Hints for Aerospace Engineers

Subscribe now to keep reading and get access to the full archive.

Continue reading