#include<stdio.h>
void main()
{
int a,b,c,d,t;
scanf("%d%d%d%d",&a,&b,&c,&d);
if(a>b)
{t=a;a=b;b=t;}
if(a>c)
{t=a;a=c;c=t;}
if(a>d)
{t=a;a=d;d=t;}
if(b>c)
{t=b;b=c;c=t;}
if(b>d)
{t=b;b=d;d=t;}
if(c>d)
{t=c;c=d;d=t;}
printf(" %d %d %d %d\n",a,b,c,d);
}
我在visualC++6.0上运行这个程序,输入四位数,可是没有输出,不晓得是怎么回事啊,谁能指点下哈
还有就是文件以cpp结尾时都是没错的,可是改为以C结尾后执行build时就会出错, 提示
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Linking...
1.obj : error LNK2005: _main already defined in Cpp1.obj
Debug/Cpp1.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
Cpp1.exe - 2 error(s), 0 warning(s),这是怎么回事啊
[ 此贴被xuer在2007-09-25 11:29重新编辑 ]