View Code of Problem 42

#include<stdio.h>
#include<math.h>
int main(){
    double a,b,c;
    scanf("%lf %lf %lf",&a,&b,&c);
    double k1,k2;
    k1=((0-b)+sqrt(pow(b,2)-4*a*c))/(2*a);
    k2=((0-b)-sqrt(pow(b,2)-4*a*c))/(2*a);
    printf("%.2f %.2f",k1,k2);
    return 0;
}

Double click to view unformatted code.


Back to problem 42