Help:only use three comparisons to sort three integer
c语言吧
全部回复
仅看楼主
level 1
i5feifei 楼主
sorry can not type chinese..hope someone can give me this programme,thanX!only use three > or < to sort three integer.that is question....
2008年03月18日 04点03分 1
level 1
i5feifei 楼主
come on, i am in computer class,need help!!!
2008年03月18日 04点03分 2
level 1
/* This program is only a demo *//* which helps you to know how to sort numbers */#include
void main(){int a=5,b=4,c=6;int temp; if(a>b){temp=a;a=b;b=temp;}if(a>c){temp=a;a=c;c=temp;}if(b>c){temp=b;b=c;c=temp;}printf("After sorting: %d %d %d\n",a,b,c);}
2008年03月18日 05点03分 3
level 1
i5feifei 楼主
...........sorry, the three integer must enter by user
2008年03月18日 05点03分 4
level 0
囧 囧看后之后只有最后句话认识
2008年03月18日 05点03分 5
level 1
i5feifei 楼主
thaX, i seems understand!chinese people are brilliant,haha
2008年03月18日 05点03分 6
level 7
Foreigner?
2008年03月18日 05点03分 7
level 1
i5feifei 楼主
nono chinese people go abroad
2008年03月18日 05点03分 8
level 8
哦! 那就是洋人老师给你们上课喽~
2008年03月18日 05点03分 9
level 5
看他名字怎么这么像 爱我菲菲??爱我肺肺!!爱我狒狒**....................
2008年03月18日 06点03分 10
1