Wrong Answer
/in/foo.c: In function 'main': /in/foo.c:8:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation] if (a > b) ^~ /in/foo.c:10:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if' a = b; ^ /in/foo.c:12:3: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized] printf("%d %d", a, b); ^~~~~~~~~~~~~~~~~~~~~
代码
#include<stdio.h>
int
main(void)
{
int a, b, tmp;
scanf("%d %d", &a, &b);
if (a > b)
tmp = a;
a = b;
b = tmp;
printf("%d %d", a, b);
return 0;
}
信息
- 递交者
- 类型
- 递交
- 题目
- 用if语句实现选择结构
- 题目数据
- 下载
- 语言
- C
- 递交时间
- 2018-10-26 00:10:05
- 评测时间
- 2018-10-26 00:10:05
- 评测机
- 分数
- 60
- 总耗时
- 9ms
- 峰值内存
- 204.0 KiB