|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
void main()
{
int a,b,c,temp;
scanf("%d,%d,d%",a,b,c);
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("%d%d",a,c);
}
错误--------------------Configuration: 练习题1 - Win32 Debug--------------------
Linking...
LINK : fatal error LNK1168: cannot open Debug/练习题1.exe for writing
执行 link.exe 时出错.
练习题1.exe - 1 error(s), 0 warning(s)
本帖最后由 小甲鱼的铁粉 于 2020-11-1 18:37 编辑
scanf里面错了
- #include <stdio.h>
- void main()
- {
- int a,b,c,temp;
- scanf("%d,%d,%d",&a,&b,&c);
- 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("%d%d",a,c);
- }
复制代码
|
|