View Code of Problem 42

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

Double click to view unformatted code.


Back to problem 42