#include<stdio.h> #include<math.h> int main() { float a,b,c; float d,e,x1,x2,t; scanf("%f%f%f",&a,&b,&c); d=-b+(sqrt(b*b-4*a*c)); e=-b-(sqrt(b*b-4*a*c)); x1=d/(2*a); x2=e/(2*a); if(x1<=x2){ t=x1; x1=x2; x2=t; } printf("%.2f %.2f",x1,x2); return 0; } /* Main.c: In function 'main': Main.c:8:3: error: stray '\357' in program d=-b+(sqrt(b*b-4*a*c)); ^ Main.c:8:3: error: stray '\274' in program Main.c:8:3: error: stray '\233' in program Main.c:9:3: error: expected ';' before 'e' e=-b-(sqrt(b*b-4*a*c)); ^ */ |
Double click to view unformatted code.