变量定义重复问题
#include"stdio.h"#include"math.h"
float yishigen(m,n,k)
float m,n,k;
{
float x1,x2;
x1=(-n+sqrt(k))/(2*m);
x2=(-n-sqrt(k))/(2*m);
printf("two shigen is x1=%.3f and x2=%.3f\n",x1,x2);
}
float denggen(m,n)
float m,n;
{
float x;
x=-n/(2*m);
printf("denggen is x=%.3f\n",x);
}
float xugen(m,n,k)
float m,n,k;
{
float x,y;
x=-n/(2*m);
y=sqrt(-k)/(2*m);
printf("two xugen is x1=%.3f+%.3fi and x2=%.3f-%.3fi\n",x,y,x,y);
}
void main()
{
float a,b,c,q;
printf("input a b c is ");
scanf("%f,%f,%f",&a,&b,&c);
printf("\n");
q=b*b-4*a*c;
if(q>0) yishigen(a,b,q);
else if(q==0) denggen(a,b);
else xugen(a,b,q);
}
请问红色字体部分的变量定义,存在重复错误吗?