View Code of Problem 42

#include <stdio.h>
#include <math.h>
int main(){
	int a,b,c;
	while(scanf("%d %d %d",&a,&b,&c)!=EOF){
		float d;
		d=sqrt(b*b-4.0*a*c);
		printf("%.2f %.2f\n",(-b+d)/(2.0*a),(-b-d)/(2.0*a));
	}
}

Double click to view unformatted code.


Back to problem 42