|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include<stdio.h>
int main(){
int a,b,c,x;
scanf("%d %d %d",&a,&b,&c);
if((a=b)&&(b=c)){
printf("%d=%d=%d\n",a,b,c);
}
if(a=b){
if(b>c){
printf("%d=%d>%d\n",a,b,c);
}
else{
printf("%d>%d=%d\n",c,a,b);
}
}
if(a=c){
if(b<c){
printf("%d=%d>%d\n",a,c,b);
}
else{
printf("%d>%d=%d\n",b,a,c);
}
}
if(b=c){
if(a<c){
printf("%d=%d>%d\n",b,c,a);
}
else{
printf("%d>%d=%d\n",a,b,c);
}
}
else{
if(a<b){
x=a;
a=b;
b=x;
}
if(a<c){
x=a;
a=c;
c=x;
}
if(b<c){
x=b;
b=c;
c=x;
}
printf("%d>%d>%d\n",a,b,c);
}
return 0;
}
#include <stdio.h>
int main()
{
int a, b, c, x;
scanf("%d%d%d", &a, &b, &c);
if ((a == b) && (b == c))
{
printf("%d=%d=%d\n", a, b, c);
}
else if (a == b)
{
if (b > c)
{
printf("%d=%d>%d\n", a, b, c);
}
else
{
printf("%d>%d=%d\n", c, a, b);
}
}
else if (a == c)
{
if (b < c)
{
printf("%d=%d>%d\n", a, c, b);
}
else
{
printf("%d>%d=%d\n", b, a, c);
}
}
else if (b == c)
{
if (a < c)
{
printf("%d=%d>%d\n", b, c, a);
}
else
{
printf("%d>%d=%d\n", a, b, c);
}
}
else
{
if (a < b)
{
x = a;
a = b;
b = x;
}
if (a < c)
{
x = a;
a = c;
c = x;
}
if (b < c)
{
x = b;
b = c;
c = x;
}
printf("%d>%d>%d\n", a, b, c);
}
return 0;
}
|
|