limit = 0.8; s = 0; while 1 tmp = rand; if tmp > limit break end s = s + tmp; end ... MATLAB while 循环类似于其他编程语言(如C 和C++)中的 do...while 循环。
確定! 回上一頁