Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- int main()
- {
- float a,b,c,delta,x1,x2;
- scanf("%f %f %f", &a, &b, &c);
- if(a == 0)
- {
- printf("NEESG\n");
- return 0;
- }
- delta = (b*b)-(4*a*c);
- if(delta<0)
- {
- printf("RNE\n");
- }
- else
- {
- x1 = (0-b+ sqrt(delta))/(2*a);
- x2 = (0-b- sqrt(delta))/(2*a);
- printf("%2.f %2.f\n", x1, x2);
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment