以下程序段的功能是求两个数中的较大数,无法实现该功能的是
A: If x > y Then num = x Else num = y
B: num = IIf(x > y, x, y)
C: num = x If y > x Then num = y
D: If y > x Then num = x num = y
A: If x > y Then num = x Else num = y
B: num = IIf(x > y, x, y)
C: num = x If y > x Then num = y
D: If y > x Then num = x num = y
举一反三
- 以下实例的输出结果是:NUM=lambda x,y : (x>y)*x + (x<y)*y if __name__ = '__main__': a = 10 b = 20 print(NUM(a,b))
- 以下代码执行后, num 的值是多少?var foo = function(x, y) {return x - y;};function foo(x, y) {return x + y;}var num = foo(1, 2);console.log(num);
- 有下列代码执行后的结果是var x = 10; function f1( num ){ ++ num; } var y = f1( x );console.log( 'x=' + x + '; y=' + y ); A: x=10; y=undefined B: x=10; y=11 C: x=11; y=11 D: x=11; y=undefined
- 有如下程序段,执行后的输出结果是______。#include<stdio.h>main(){structa{intx;inty;}num[2]={{20,5},{6,7}};printf(''%d'',num[0].x/num[0].y*num[1].y);}
- 以下程序输出结果为:#include<;stdio.h>;int num(int x,int y){int a,b;a=x+y;b=x-y;}int main(){int a=3,b=2;int x,y;x=a+b;y=a-b;num(a,b);printf("%d",a);return 0;}