自定义个max方法就行了,代码如下:int max(int x,int y){return x>y?x:y;}int main(){int a,b,c;scanf("%d,%d",&a,&b);c=max(a,b);printf("max=%d\n",c);return 0;}