fork download
  1. set ul 10
  2. set ll 1
  3.  
  4. proc rgen {ll ul} {
  5. global r
  6. set r ([expr $ll+int(rand()*$ul + 1)])*
  7. return $r
  8. }
  9. for {set i 0} {$i < 10} {incr i} {
  10. set result [rgen 1 10]
  11. puts -nonewline "\t $result"
  12. }
Success #stdin #stdout 0.02s 5272KB
stdin
Standard input is empty
stdout
	 (4)*	 (3)*	 (6)*	 (2)*	 (6)*	 (4)*	 (10)*	 (6)*	 (7)*	 (10)*