将以下程序写成三目运算表达式语句是: if (a>b) max=a;else max=b;
举一反三
- 将以下程序写成三目运算表达式语句是:if (a>b) max=a;else max=b; A: max=(a>b)?; B: (max=a>b)?a:b; C: c=(a>b)?a:b; D: max=(a>b)?a:b;
- 将以下程序写成三目运算表达式语句是:if(a>b)max=a;elsemax=b; A: max=(a>b)?; B: (max=a>b)?a:b; C: c=(a>b)?a:b; D: max=(a>b)?a:b;
- 以下语句的运行结果是( )int a=50, b=60;int max=0;if( a<b) max = b;else max = a;printf("%d\n", max); A: 0 B: 50 C: 60 D: 程序错误
- 请阅读以下程序,并选择最终max的值:var a=10,b=13.5,c=11,max;if(a >; b){ if(a >; c){max = a;}else{max = c;}}else{if(b >; c){max = b;}else{max = c;}} A: 10 B: 12 C: 11 D: 13.5
- 下面程序的运行结果是: int a=3,b=2,max; if (a>b) max=a; else max=b; printf("max=%d",max); A: max=%d B: max=3 C: 3 D: max=2