Posted  by 

Dev C++ Quadratic Equation

I am supposed to write a program that asks for the coefficients a, b, and c of a quadratic equation ax2+bx+c=0. It needs to display to the screen one of the following:
• two distinct real numbers (when b2-4ac > 0),
• two distinct complex numbers (when b2-4ac < 0), or
• one real number (when b2-4ac = 0)

  1. Program and application that were also utilized during the development process is Dev-c compiler. The Dev-c compiler was to compile, run and debug the program. The programs is been written in modules, the first modules deals with the input of data, computation and display on the screen, the input of data concerning the value of the quadratic equation of ax 2 + bx + c = 0, while the second module is the control structure were it.
  2. Each of the solutions given by the quadratic formula is called a root of the quadratic equation. Geometrically, these roots represent the x values at which any parabola, explicitly given as y = ax2 + bx + c, crosses the x -axis. As well as being a formula that will yield the zeros of any parabola.
  3. Hi, I am trying to make a variable equation solver using DEV-C. I just need to know how to get C to solve an equation inputed by the user. So you input something like 1+1 and i need it to solve the problem and output the answer. Heres an example.
  4. For a quadratic equation ax 2 +bx+c = 0 (where a, b and c are coefficients), it's roots is given by following the formula. The term b 2 -4ac is known as the discriminant of a quadratic equation. The discriminant tells the nature of the roots. If discriminant is greater than.

I have worked the following program and it doesn't work when set up this way:

If I change the last statement to 'if else' the program works, but I don't think that would be correct. Please help.

Solving Quadratic Equations Calculator

The standard form of a quadratic equation is: ax 2 + bx + c = 0, where a, b and c are real numbers and a!= 0 The term b 2 -4ac is known as the discriminant of a quadratic equation. It tells the nature of the roots.

TRAKTOR SCRATCH is now included in TRAKTOR PRO 3, right out of the box. This means that DVS DJs using timecode vinyl can now use any soundcard they like, in addition to tried and tested, TRAKTOR SCRATCH Certified soundcards and mixers. Traktor scratch pro timecode kit.

Edited by WaltP: Added CODE tags -- with all the help about them, how could you miss using them????
  • 3 Contributors
  • forum 4 Replies
  • 827 Views
  • 7 Hours Discussion Span
  • commentLatest Postby abhimanipalLatest Post

Dave Sinkula2,398

I am supposed to write a program that asks for the coefficients a, b, and c of a quadratic equation ax2+bx+c=0. It needs to display to the screen one of the following:
• two distinct real numbers (when b2-4ac > 0),
• two distinct complex numbers (when b2-4ac < 0), or
• one real number (when b2-4ac = 0)

I have worked the following program and it doesn't work when set up this way:

If I change the last statement to 'if else' the program works, but I don't think that would be correct. Please help.

It's a syntax error as written, and won't compile, so it can't be run. Why would you think this is more correct?

You're also not declaring a, b, and c. Please post actual code and wrap it in code tags.

Quadratic Formula In C

It would be less redundant to use a temporary, say

Dev C++ Quadratic Equation Worksheet

instead of recalculating it several times. It is also cleaner, clearer, and easier to read.