Question: code in C please Assignment We continue to write programs to help middle schoolers do their math homework. This time we'll help them with the
Assignment We continue to write programs to help middle schoolers do their math homework. This time we'll help them with the qwadratic formula In algebra, a quadratic equation is usually written in the form: y - ax+ b Students are often asked to find the roots of the quadratic equation. That is, find the values of x that make y zero. These roots (if they exist) are easily found using the quadratic formula. which you will use in your program Your program should query the user for the constants a, b and c then output the values of the two roots. Your program should print out the "work" so a middle schooler can just copy the output of your program for hisher homework. A sample run of your program should look like the following. (The user's responses are in orange) PTI10318 geo -Wal1 quad. PTI 104 ]* ./a . out Specify your quadratie eguation in the forsi y - bx Enter bi Enter et 1. Please name your C program quad. 2. Remember that you must declare a variable before you use it. For this program, all of your variables should have type double. 3. To square the variable b, just use b b. 4. You will need to use the sqreoi function from the math library. Her's an example shown the discriminant, assuming you have the discriminant stored in a double variable called dise). 5. Remember that when you use functions from the math library, you need to have: in class: See math.c on blackboard. (Basically, just use eqrtt disc ) when you want to calculate #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
