下面程序的运行结果是()intm=4,n=6;max(intx,inty){intmax;max=x>y?x:y;return(max);}main(){intm=10;printf('%d',max(m,n));}
A: 4
B: 10
C: 6
D: 5
A: 4
B: 10
C: 6
D: 5
举一反三
- 以下程序的输出结果是( ) int m=4,n=6; max( int x,int y) {int max; max=x>y?x:y; return(max); } main( ) {int m=10; printf("%d",max(m,n)); }
- 有如下程序:#include"stdio.h"int max(x,y)int x,y;{int z;if(x>;y) z=x;else z=y;return(z);}main(){extern int a,b;printf(”max=%d\n",max(a,b));}int a=3,b=5;运行结果为( )。 A: max=3 B: max=4 C: max=5 D: max=6
- 10、以下程序的运行结果是( )#include <;stdio.h>;void main(){ int a=1,b=2,c;c=max(a,b);printf(“max is %d\n”,c);}max(int x, int y){ int z;z=(x>;y)? x:y;return(z);} A: max is 2 B: max is 1 C: max is 3 D: max is 12
- 下列程序的运行结果是()。#include"stdio.h"intfun(inta,intb){intmax;if(a<b)max=b;elsemax=a;return(max);}main(){intx=7,y=9,z;z=fun(x,y);printf("%d",z);}
- 下面正确的是() #include <stdio.h> int main() { int max(int x,int y); int a,b,c; scanf("%d,%d",&a,&b); c=max(a,b); printf("max=%d ",c); return 0; } int max(intx,inty); { int z; if(x>y)z=x; else z=y; return(z); }