问题:[选择题]
A.FunctionF1(bAsInteger)IfbMod2=0ThenReturn0ElseReturn1EndIfEndFunction
B.FunctionF1(bAsInteger)IfbMod2=0ThenF1=0ElseF1=1EndIfEndFunction
C.FunctionF1(bAsInteger)IfbMod2=0ThenF1=1ElseF1=0EndIfEndFunction
D.FunctionF1(bAsInteger)IfbMod2<>0ThenReturn0ElseReturn1EndIfEndFunction
● 参考解析
VisualBasic程序中不能使用Return语句来返回一个函数的值。要返回一个函数的值,需要把这个值赋值给函数名。所以本题中A、D选项错误,而题目中,当b为奇数时返回0,所以本题答案是B。