السلام عليكم ورحمة الله وبركاته
ياليت من الاخوان يساعدونا في تصحيح هذا البرنامج ولكم جزيل الشكر مسبقاً
/* Evaluating the roots of a quadratic*/
#include <studio.h>
#include <math.h>
void main ()
{
int a,b,c /* the coeffcients */
float disc; /* the discriminat*/
float root1,root2; /* the roots */
/*output of the heading and input of the coefficients*/
printf ('\n\nEVALUATING THE ROOTS OF A QUADRTIC WQUATION");
printf ("\n\nPlease input the coefficient on one line with space between>");
scanf("d&d&d",&a,&b,&c);
/* Evluating the discriminant */
disc = b8b-4*a*c
/* Evaluating the roots assuming the coefficient lead to real roots*/
root1 = (-b + sqrt(disc)/(2*a);
root2 = (-b -sqrt(disc)/(2*a);
/* Output of the roots */
printf("\nthe roots of the quadratic are: &8.2f& and &8.3f",root1,root2);
/* pause before returning */
printf('\n\npress any key to return");
}