全国计算机等级考试二级VB程序设计模拟试题四
写出下列程序的正确运行结果(每题5分,共10分) 1.Private Sub Command1_Click( ) Print Int(-4.5)+Round(-4.5); Print Lcase(“AAbbEE”); Print Len(“vb程序设计语言”); Print Mid(“计算机科学与技术”,4,2); Print Rtrim(“abc ”)+“def” End Sub
2. Public Sub Swap(ByVal x As Integer, y As Integer) Dim t As Integer t=x: x=y: y=t End Sub Private Sub Command1_Click( ) Dim a As Integer ,b As Integer a=10: b=20 Swap a ,b Print “a=”; a ;”b=”; b End Sub 写出下列程序的正确运行结果(每题5分,共10分) 1.-10 aabbee 8 科学 abcdef 2.a= 10 b= 10 相关资料 |