高人来看看,为什么输不出结果?
/* HELLO.C -- Hello, world */#include "stdio.h"
#include "conio.h"
main()
{
float a,b,r,x1,x2,y1,y2,t1;
printf("Enter Three Numbers:");
scanf("%f%f%f",&a,&b,&r);
t1=4*(a*a*r*r+r*r-b*b);
if(t1<0)
if(t1=0)
if (t1>0)
printf("x1=%f, y1=%f, x2=%f, y2=%f\n",x1=(-2*a*b-t1)/(2*(a*a+1)),y1=a*x1+b,x2=(-2*a*b+t1)/(2*(a*a+1)),y2=a*x2+b);
else printf("x1=%f, y1=%f\n",x1=-2*a*b/(2*(a*a+1)),y1=a*x1+b);
else printf("no solution\n");
getch();
}