#include <stdio.h>
int main(){
int a;
int b;
int c;
int D;
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
D=(b*b)-(4*a*c);
if (a != 0)
{
if (D>0)
{
printf("Two different roots x1=%d , x2=%d\n",(-b+D^(1/2))/(2*a),(-b-D^(1/2))/(2*a));
}
if (D==0)
{
printf("Two same roots x=%d\n",-b/(2*a));
}
if (D<0)
{
printf("No real root\n");
}
}
}
return 0 ;
}
#include
int main(){
int a;
int b;
int c;
int D;
while(scanf("%d%d%d",&a,&b,&c)!=EOF)
{
D=(b*b)-(4*a*c);
if (a != 0)
{
if (D>0)
{
printf("Two different roots x1=%d , x2=%d\n",(-b+D^(1/2))/(2*a),(-b-D^(1/2))/(2*a));
}
if (D==0)
{
printf("Two same roots x=%d\n",-b/(2*a));
}
if (D<0)
{
printf("No real root\n");
}
}
}
return 0 ;
}
挫<<<這裡