题干

【加试题】如图所示,a 、b 、c 三个数比较大小,单击“求最大值”按钮,在文本框Text4中输出三者之间最大的数,选出不能实现该功能的程序段(   )

A:If a >= b And a >= c Then Text4.Text = Str(a)If b >= a And b >= c Then Text4.Text = Str(b)If c >= a And c >= b Then Text4.Text = Str(c)

B:Max = aIf b > Max Then Max = bIf c > Max Then Max = cText4.Text = Str(Max)

C:If a > b And a > c Then    Text4.Text = Str(a)ElseIf b > a And b > c Then    Text4.Text = Str(b)Else    Text4.Text = Str(c)End If

D:If a > b Then   If a > c Then Text4.Text = Str(a) Else Text4.Text = Str(c)Else   If b > c Then Text4.Text = Str(b) Else Text4.Text = Str(c)End If

上一题 下一题 0.0难度 选择题 更新时间:2016-02-16 04:17:46

答案(点此获取答案解析)

C