algorithm about find the roots of quadratic equation
yar koi bhi jaldi se agar bana do to meharbani ho gi i am wating
algorithm about find the roots of quadratic equation
yar koi bhi jaldi se agar bana do to meharbani ho gi i am wating
ma ishq-e-kainaat ma zanjeer ho saku
mujh ko hisar-e-zaat ke shar se rahai de
bahi jaan yeh c k ley hai ..C_program_to_find_roots_of_quadratic_equation
#include<stdio.h>
#include<conio.h>
#include<math.h>
void main()
{
int a,b,c,d;
float x1,x2,x,realp,imp;
clrscr();
printf("Enter the values of a,b & c:\n");
scanf("%d %d %d",&a,&b,&c);
d=b*b-4*a*c;
if(d>0)
{
x1=-b+sqrt(d)/(2*a);
x2=-b-sqrt(d)/(2*a);
printf("\nThe Roots are real and not equal");
printf("\nThe roots are........x1=%f x2=%f",x1,x2);
}
else if(d==0)
{
x=-b/(2*a);
printf("\nThe roots are real and repeated");
printf("\nHence the repeated root x is %f",x);
}
else
{
realp=sqrt(abs(d))/(2*a);
imp=sqrt(abs(d))/(2*a);
printf("\nThe roots are complex or imaginary ");
printf("\n root1=%f+i%f",realp,imp);
printf("\n root2=%f-i%f",realp,imp");
}
getch();
}
ایک طرف لمبی لمبی امیدیں
دوسری طرف کل نفس ذائقۃ الموت
YE WEBSITE VISIT KARE MAINE BOHAT PROBLEM SOLVE KARI HAI
VISIT
BestRegards
lMicrosoft Certified IT Professional l System Engineerl Hardware,Virtualization,Wirelessl
Bookmarks