回复 楼主 哈夫曼
是想把a b c 和1 2 3绑定吧,用struct
#include <stdio.h>
int main(void)
{
struct number
{
char word;
int num;
};
struct number a={'a',1},b={'b',2},c={'c',3},d={' ',0};
if(a.num>b.num) ;else {d=a;a=b;b=d;};
if(a.num>c.num) ;else {d=a;a=c;c=d;};
if(b.num>c.num) ;else {d=b;b=c;c=d;};
printf("%c\n%c\n%c\n",a.word,b.word,c.word);
return 0;
}