以下代码是求ax(二次方)+bx+c=0的代码 。请问哪里出错。错误代码:warning: no newline at end of file
+++分割线++++++++++++++++++++分割线+++++++++++++分割线+++++++++++++++分割线++++#include <stdio.h>
#include <mach.h>
void main()
{int a,b,c,p,x,y;
printf("please input \n");
scanf("&d,&d,&d",a,b,c);
p=b*b-4*a*c;
if(a=0,b=0)
printf("erro!\n");
else if(a=0,b!=0)
x=-(c/b);
printf("x=%d\n",x);
else if(p<0)
printf("wu jie!\n");
else
x=(-b+sqrt(pi))/(2*a);
y=(-b-sqrt(pi))/(2*a);
printf("x=%d\n",x);
printf("y=%d\n",y);
}
+++分割线++++++++++++++++++++分割线+++++++++++++分割线+++++++++++++++分割线++++#include <stdio.h>
#include <mach.h>
void main()
{int a,b,c,p,x,y;
printf("please input \n");
scanf("&d,&d,&d",a,b,c);
p=b*b-4*a*c;
if(a=0,b=0)
printf("erro!\n");
else if(a=0,b!=0)
x=-(c/b);
printf("x=%d\n",x);
else if(p<0)
printf("wu jie!\n");
else
x=(-b+sqrt(pi))/(2*a);
y=(-b-sqrt(pi))/(2*a);
printf("x=%d\n",x);
printf("y=%d\n",y);
}