专门设置一个变量MAX,将较大的字符放入其中……用这个方法
#include <stdio.h> int main() { char a,b,MAX; scanf("%c %c",&a,&b); MAX = a > b?a : b; printf("%c",MAX); return 0; }