tc2中怎么比较两个数的大小

来源:百度知道 编辑:UC知道 时间:2024/05/30 08:25:56

#include <stdio.h>
int main()
{ int a,b;
scanf("%d,%d".&a,&b);
printf("%d",a>b?a:b);
return 0;
}

用数学中的 > <就行.
也能用>= <=,这和数学里有些不同(大于等于,小于等于)