C Program to calculate roots of quadratic equations
This is a simple C program to calculate roots of quadratic equations.A function sqrt() is used in this program to find the square root.Also, we will have to include the math.h header.
#include#includemain(){int a,b,c,d;float root1,root2;printf("Enter the values of a,b,c");scanf("%d%d%d",&a,&b,&c);d=b*b-4*a*c;root1=((-b)+sqrt(d))/(2*a);root2=((-b)-sqrt(d))/(2*a);printf("root1=%f and root2=%f",root1,root2);}
Comments
please help me making this blog more useful by posting your comments and suggestions.
your comments and suggestions are welcome.
I WAS VERY HAPPY ABOUT THIS...THANK YOU SO SO MUCH!!!!!
YAHOOOOOO I FINALLY GOT IT
I WAS VERY HAPPY ABOUT THIS...THANK YOU SO SO MUCH!!!!!
YAHOOOOOO I FINALLY GOT IT