|
|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
#include <stdio.h>
#include <math.h>
void main()
{
double a, b, c, s, x1, x2;
printf("请输入a,b,c的值");
scanf("%lf,%lf,%lf",&a,&b,&c);
s = sqrt(b * b - 4 * a *c);
x1 = (-b + s) / (2*a);
x2 = (-b - s) / (2*a);
printf("x1=%f,x2=%f",x1,x2);
}
这个程序,编译的时候没问题,但是生成可执行文件的时候出现错误
--------------------Configuration: c - Win32 Debug--------------------
Linking...
02.obj : error LNK2005: _main already defined in 01.obj
Debug/c.exe : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
c.exe - 2 error(s), 0 warning(s)
求解答,谢谢 |
|