第1个回答 2012-05-12
易语言:
.版本 2
.支持库 spec
.子程序 __启动窗口_创建完毕
.局部变量 随机数, 文本型
.局部变量 文本, 文本型
.计次循环首 (20, )
置随机数种子 ()
随机数 = 多项选择 (取随机数 (1, 10), “1”, “2”, “3”, “4”, “5”, “6”, “7”, “8”, “9”, “0”)
文本 = 文本 + 随机数
.计次循环尾 ()
调试输出 (文本)
第2个回答 2012-05-11
MessageBox("程序开始")
set fso=CreateObject("Scripting.FileSystemObject")
const forreading=1
const forwriting=2
const forappending=8
Rem start
Dim fso
count=0
pd1=fso.FileExists("d:\随机数.txt")
If pd1=0
set pd1=fso.createtextfile("d:\随机数.txt",false)
pd1.close
End If
Randomize
x = Int((99999999 * Rnd) + 10000000)
MessageBox(x)
set pd12=fso.opentextfile("d:\随机数.txt",forappending)
pd12.writeline(x)
pd12.close
Goto start