/ 科创班 /

记录详情

Wrong Answer

/in/foo.c: In function 'swap':
/in/foo.c:11:1: warning: control reaches end of non-void function [-Wreturn-type]
 } 
 ^
/in/foo.c: In function 'exchange':
/in/foo.c:21:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
# 状态 耗时 内存占用
#1 Wrong Answer 2ms 256.0 KiB
#2 Wrong Answer 2ms 256.0 KiB

代码

#include <stdio.h>  
int swap(int a,int b)
{
	int t;
	  if(a < b)  
    {  
        t = a;  
        a = b;  
        b = t;  
    } 
} 
int exchange(int a,int c )
{
	int t;
	  if(a < c)  
    {  
        t = a;  
        a = c;  
        c = t;  
    } 
}
int main()  
{  
    int a,b,c,t;   
    scanf("%d%d%d",&a,&b,&c);  
    swap(a,b);
    exchange(a,c);
    if(b < c)  
    {  
        t = b;  
        b = c;  
        c = t;  
    }  
    printf("%d\n%d\n%d\n",a,b,c);  
    return 0;  
}

信息

递交者
类型
递交
题目
按大到小的顺序输出三个数
题目数据
下载
语言
C
递交时间
2018-06-18 18:10:27
评测时间
2018-06-18 18:10:27
评测机
分数
0
总耗时
4ms
峰值内存
256.0 KiB