for i= 1 to 20
'===========================
ml = 10 + Int(Rnd * 3) / 10
M = 0.1 + Int(Rnd * 17) / 10000
v = 15 + Int(Rnd * 30)/10
x = M * v * 10 / ml / 0.1
'======================
mlb = 10 + Int(Rnd * 3) / 10
Mb = 0.1 + Int(Rnd * 17) / 10000
vb = 15 + Int(Rnd * 30)/10
xb = Mb * vb * 10 / mlb / 0.1
'===============================
MBo=ml & " " & M & " " & v & " " & x
MBx=mlb & " " & Mb & " " & vb & " " & xb
MBox=MBo & chr(13) & MBx & chr(13) & (xb+x)/2
f = f & chr(13) & "=====================" & chr(13) & MBox
i=i+1
next
msgbox f
我想将F的数据写入一个记事本文件。怎样做?vbs代码。