كتبت على برنامج فيجوال استديو 2008 لغة c معادلة من الدرجة الثانية بس لم تظهر لي نتائج اتمنى المساعده من الاخوان الافاضل وهذا هو البرنامج افيدوني اذا فيه خطا ،،،
#include "stdafx.h"
#include<stdio.h>
#include<math.h>
#include<conio.h>
int _tmain(int argc, _TCHAR* argv[])
{
float a,b,c,x1,x2;
float d;
printf("Enter The Value if a=");
scanf("%f", & a);
printf("Enter The Value if b=");
scanf("%f", & b);
printf("Enter The Value if c=");
scanf("%f", & c);
d=sqrt(b*b-4*a*c);
if (d>0)
x1=(-b+d)/2*a;
x2=(-b-d)/2*a;
printf("The Value if x1=\n");
printf("The Value if x2=\n");
else if (d<0)
printf("No Solution");
else if (d=0)
x1=x2= -b/2*a;
printf("The Value if x1=x2=");
getch();
return 0;
}