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 [r 1 10]
  11. puts -nonewline "\t $result"
  12. }
Runtime error #stdin #stdout 0.03s 5272KB
stdin
Standard input is empty
stdout
Standard output is empty