#include<stdio.h>
#include<math.h>
int main()
{
	double a, b, c, delta, x1, x2;
	printf ("ax^2 + bx + c \n\n");
	printf("moadele darage 2 be shekle bala ast, be tartib zaraeb a, b, c ra vared konid.\n");
	printf ("\na = ");
	scanf("%lf", &a);
	printf ("\nb = ");
	scanf("%lf", &b);
	printf ("\nc = ");
	scanf("%lf", &c);
	delta = b * b - 4 * a * c;
	if(delta > 0)
	{
		x1 = (-b + sqrt(delta))/(2*a);
		x2 = (-b - sqrt(delta))/(2*a);
		printf("\ntedade rishe ha 2ta ast : x1 = %g, x2 = %g\n", x1, x2);
	}
	else
		if(delta == 0)
		{
			x1 = -b / (2 * a);
			printf("\nfaghat yek rishe darad : x = %g\n", x1);
		}
		else
			printf("\nhich rishe nadarad\n");
	getch();
}

