题目内容

要求如果x被7除余2,则输出x的值,下列语句中不能实现此功能的语句是______。

A. If x Mod 7 = 2 Then Print x
B. If x - (x \ 7) * 7 = 2 Then Print x
C. If x - (x / 7) * 7 = 2 Then Print x
D. If x - Int(x / 7) * 7 = 2 Then Print x

查看答案
更多问题

设A = "A",B = "B",C = "C",D = "D",执行语句X = IIf((A < B) Or (C > D), "A", "B")后,X的值为______。

A. "a"
B. "b"
C. "B"
D. "A"

编写如下程序:Private Sub Command1_Click()Dim score As Integerscore = 90If score > 80 Thenr = 5ElseIf score > 60 Thenr = 3Elser = 1End IfPrint rEnd Sub程序运行后,单击命令按钮Command1,输出结果为(______)。

有如下程序:Private Sub Command1_Click()x = InputBox("input value")Select Case xCase Is > 0y = x + 3Case Is = 0y = x + 2Case Elsey = x + 1End SelectPrint x; y End Sub假设运行时从键盘上输入-8,输出结果是(______)。

在窗体上画一个命令按钮和一个文本框,名称分别为Command1和Text1,然后编写如下程序:Private Sub Command1_Click()A = InputBox("请输入日期(1~31)")T = "旅游景点:" & IIf(A > 0 And A<= 10, "长城", "") & IIf(A > 10 And A <= 20,"故宫", "") & IIf(A > 20 And A <= 30, "颐和园", "")Text1.Text = TEnd Sub程序运行后,单击命令按钮,如果从键盘输入26,则在文本框中显示的内容是______。

答案查题题库