answersLogoWhite

0

(Uses Square Root Function)

PRINT "Ax^2 + Bx + C = 0"

INPUT "A = ", A

INPUT "B = ", B

INPUT "C = ", C

D = B * B - 4 * A * C

IF D > 0 THEN

DS = SQR(D)

PRINT "REAL ROOTS:", (-B - D) / (2 * A), (-B + D) / (2 * A)

ELSE

IF D = 0 THEN

PRINT "DUPLICATE ROOT:", (-B) / (2 * A)

ELSE

DS = SQR(-D)

PRINT "COMPLEX CONJUGATE ROOTS:", (-B / (2 * A)); "+/-"; DS / (2 * A); "i"

END IF

END IF

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

How do engineers use the quandratic formula?

Law of motion is quadratic equation and is use in calculate of object trajectory. Fluid dynamic for sizing of pump is also second order equation. Quadratic equation or higher may use to fit equation for fast calculation of result. Example on vapour density equation for the use of evaporative mass transfer. We do need to know how much water air can take. It could use the data from table but the work will be lengthly. We can make data in the table a form of polynomial equation and so put it into program for calculated out this require vapour density.


Write a program to find the square root of the quadratic equation using flow chart?

You don't need a flow chart for that; just use the quadratic formula directly; most programming languages have a square root function or method. You would only need to do this in many small steps if you use Assembly programming. The formulae would be something like this: x1 = (-b + sqrt(b^2 - 4*a*c)) / (2 * a) and x2 = (-b - sqrt(b^2 - 4*a*c)) / (2 * a) where a, b, and c are the coefficients of the quadratic equation in standard form, and x1 and x2 are the solutions you want.


Write a c program to find the roots of a quadratic equation using if else?

/*Hello!! I'm aditya From Bangalore I have the solution of this program*/ #include <stdio.h> #include <math.h> main() { float a,b,c,x1,x2,delta=0; printf("enter the value of a,b,c\n"); scanf("f%f",&a,&b,&c); delta=((b*b)-(4ac)); if(a=0) { printf("the variables cannot form a quadratic equation\n"); } else { x1=(-b)+(sqrt(((b*b)-(4ac))/2a)) x2=(-b)-(sqrt(((b*b)-(4ac))/2a)) } if(delta=0) { printf("the roots are real and equal"); } if(delta>0) { printf("the roots are real and distinct"); } if(delta<0) { printf("the roots are imaginary"); x1=(-b)+(sqrt(((b*b)-((4ac))/(float)(2a)) x2=(-b)-(sqrt(((b*b)-((4ac))/(float)(2a)) } printf("the roots of the equation are %2.2f\n",x1,x2,delta); } /*the program is written by using simple-if and if-else constructs*/


Program to generate tokens from a given expression string?

a promlem to solve an equation or a assigment


C program to calculate the roots of a quadratic equation using two pointer parameters?

#include <stdio.h> #include <conio.h> #include <math.h> void main() { float a, b, c; float root1, root2,de,d; printf("enter the values of a, b and c"); scanf("%f%f%f", &a,&b,&c); de=(b*b)-4*(a*c); d=sqrt(de); root1=(-b+d) /(2.0*a); root2=(-b-d) /(2.0*a); printf(" roots of the equation are %f %f", root1,root2); getch(); }

Related Questions

Algorithm to find the roots of a quadratic equation?

The easiest way to write a generic algorithm is to simply use the quadratic formula. If it is a computer program, ask the user for the coefficients a, b, and c of the generic equation ax2 + bx + c = 0, then just replace them in the quadratic formula.


A program using bufferedreader in quadratic equation?

doctor


How do you program the quadratic formula into your calculator?

It all depends on what calculator you use to know how to program the formula into it.


Where can someone find information on quadratic equation solvers?

If you are looking to download an app on your ti-84 or higher calculator, you should watch the "Quadratic Formula Program on the Ti-84" on youtube. Best of Luck!


How do you write a program to solve a quadratic equation which has upto power 2 for example xto power 2 plus product of and x subtract 3 equals to 0?

to solve ax2 + bx + c use the quadratic formula: (-b +/-(b2 - 4ac))/2a. Programming this should be a doddle.


How do engineers use the quandratic formula?

Law of motion is quadratic equation and is use in calculate of object trajectory. Fluid dynamic for sizing of pump is also second order equation. Quadratic equation or higher may use to fit equation for fast calculation of result. Example on vapour density equation for the use of evaporative mass transfer. We do need to know how much water air can take. It could use the data from table but the work will be lengthly. We can make data in the table a form of polynomial equation and so put it into program for calculated out this require vapour density.


What is the meaning of fabs in quadratic equation in c program?

In the C Programming Language, the fabs function returns the absolute value of a floating-point number


How do you program quadratic formula?

I just agreed this section in algebra 1, so I'm pretty sure it's ax2 (ax squared) +bx+c.


Write a program to find the square root of the quadratic equation using flow chart?

You don't need a flow chart for that; just use the quadratic formula directly; most programming languages have a square root function or method. You would only need to do this in many small steps if you use Assembly programming. The formulae would be something like this: x1 = (-b + sqrt(b^2 - 4*a*c)) / (2 * a) and x2 = (-b - sqrt(b^2 - 4*a*c)) / (2 * a) where a, b, and c are the coefficients of the quadratic equation in standard form, and x1 and x2 are the solutions you want.


Write a program in C programming language that computes the roots of the quadratic equation ax2 plus bx plus c?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you.


Where do you use the quadratic formula in life?

I've used the quadratic formula in tuning software in High Performance automobiles. I had to input data into excel, then the program shot out the values in the quad for the tuning software to decipher what the voltage values of the input corresponded to AFR value (the values I put in). It was quite accurate. That's the only cool and practical application I have found so far in my line of work.


The sum of two decimal numbers is 3.9 their difference is 0.9 and their product is 3.6 what are the two numbers?

If you use the quadratic equation, all you need to know are the first and last statement. The middle one can get confusing because you need to include absolute value. Set up a system of equations: {x+y=3.9 {x*Y=3.6 Solve the second one for x and you get x=3.6/y Substitute that for the x in the first equation and you get: (3.6/y) + y = 3.9 If you multiple the y by (y/y) you can change it to (y^2 / y) So the equation becomes: (3.6/y) + (y^2/y) = 3.9 Add like terms to get: (3.6 + y^2)/y = 3.9 Multiple both sides by y to get: 3.6 + y^2 = 3.9y Get all the terms one side and re-order them to make it look like a quadratic equation: y^2 -3.9y + 3.6 = 0 Now use a calculator program or the quadratic formula to solve. You get that the numbers are 2.4 and 1.5