下列事件过程的功能是:建立一个名为Data1的随机文件,存放角度值及这些角度的正弦函数值和余弦函数值,角度为1 2,3,…,90。请在空白处填入适当的内容,将程序补充完整。 Private Type Ang K As Integer Sinx As Sin

admin2010-11-20  29

问题 下列事件过程的功能是:建立一个名为Data1的随机文件,存放角度值及这些角度的正弦函数值和余弦函数值,角度为1 2,3,…,90。请在空白处填入适当的内容,将程序补充完整。
Private Type Ang
K As Integer
Sinx As Single
Cosx As Single
End TyPe
Dim Ksc As Ang
Private Sub Form_Click()
Dim Y As Single
Open "c:\Data1.txt" For Random As #2 Len=10
Y=3.14159/180
For i=1 T0 90
Ksc.K=i
Ksc.Sinx=Sin(i*Y)
Ksc.Cosx=Cos(i*Y)
______
Next
Close #2
End Sub

选项

答案“C:\Data1.txt” For Random As #2 Len=10

解析 打开一个随机文件的一般格式为:“Open "文件名称" For Random As #文件号[Len=记录长度]”
转载请注明原文地址:https://kaotiyun.com/show/GBhp777K
0

最新回复(0)