更多"在E盘当前目录文件夹下建立一个名为“Student.txt’’’的顺序"的相关试题:
[单项选择]在E盘当前目录文件夹下建立一个名为“Student.txt”的随机文件,要求用InputBox函数输入5个学生的姓名(StuName)、年级(StuGrade)和年龄(StuAge)。在程序中有以下记录类型和窗体的事件过程,请选择正确的语句完成程序( )。 Private Type student StuName As String*10 StuGrade As String*10 StuAge As Integer End Type Private Sub Form_Click( ) Dim s As student Open "c:/student.txt" For Random As #1 Len=Len(s) For i=1 To 1 s.StuName=InputBox("请输入姓名") s.StuGrade=InputBox("请输入年级号") s.StuAge=Val(InputBox("请输入年龄")) Next i Close #1 End Sub
A. Print #1,s
B. Print #1,i
C. Put #1,,s
D. Put #1,,i
[单项选择]在E盘当前目录文件夹下建立一个名为“Student.txt”,的随机文件,要求用InputBox函数输入5个学生的姓名(StuName)、年级(StuGrade)和年龄(StuAge)。在程序中有下列记录类型和窗体的事件过程,请选择正确的语句完成程序( )。
Private Type student
StuName As String*10
StuGrade As String*10
StuAge As Integer
End Type
Private Sub Form_Click( )
Dim s As student
Open"c:/student.txt"For Random As#1 Len=Len(s)
For i=1 To 1
s.StuName=InputBox("请输入姓名")
s.StuGrade=InputBox("请输入年级号")
s.StuAge=Val(InputBox("请输入年龄"))
______
Next i
Close#1
End Sub
A. Prim#1,s
B. Print#1,1
C. Put#1,,s
D. Put#1,,i
[填空题]在E盘当前目录文件夹下建立一个名为“Student.txt’’的顺序文件,要求用InputBox函数输入5个学生的姓名(StuName)、年级(StuGrade)和年龄(StuAge)。
Private Sub Form _ Click( )
【12】
For i=1 To 5
StuName=InputBox("请输入姓名")
StuGrade=InputBox("请输入年级号")
StuAge=InputBox("请输入年龄")
【13】
Next i
【14】
End Sub
[填空题]在E盘当前目录文件夹下建立一个名为“Student.txt’’’的顺序文件,要求用InputBox函数输入5个学生的姓名(StuName)、年级(StuGrade)和年龄(StuAge)。
Private Sub Form _ Click( )
【 】
For i=1 To 5
StuName=InputBox("请输入姓名")
StuGrade=InputBox("请输入年级号")
StuAge=InputBox("请输入年龄")
【 】
Next i
【 】
End Sub
[填空题]在C盘当前文件夹下建立一个名为StuData.txt的顺序文件。要求用InputBox函数输入5名学生的学号(StuNo)、姓名(StuName)和英语成绩(StuEng)。
Private Sub Form_ Click( )
Open “C://StuData.txt” For OutPUt As #1
For i=1 To 5
StuNo=InputBox(“请输入学号”)
StuName=InputBox(“请输入姓名”)
StuEng=Val(InputBox(“请输入英语成绩”))
【15】
Next i
Close #1
End Sub
[填空题]在C盘当前文件夹下建立一个名为StuData. txt的顺序文件。要求用InputBox函数输入5名学生的学号(StuNo)、姓名(StuName)和英语成绩(StuEng)。
Private Sub Form Click( )
Open"C: StuData. txt"For OutPut As#1
Fori=1 To 5
StuNo=InpuzztBox(“请输入学号”)
StuName=InputBox(“请输入姓名”)
StuEng=Val(InputBox(“请输入英语成绩”))
【15】
Next i
Close#1
End Sub