+ 3
Please i need help for my cpp assignment can anyone help please....ASAP
Write a C++ program that solves quadratic equation to find its roots. The roots of a quadratic equation ax2 + bx + c = 0 (where a is not zero) are given by the formula: (–b ± sqrt(b2 – 4ac)) / 2a The value of the discriminant (b2 – 4ac) determines the nature of roots. If the value of the discriminant is zero then the equation has a single real root. If the value of the discriminant is positive then the equation has two real roots. If the value of the discriminant is negative, then the equation has two complex roots. The program takes values of a, b, and c as input and outputs the roots.
6 Answers
+ 1
Sorry for late response, first learn basic c++ input output operations, take inputs seperately for a, b and c, then make your calculations or take input as a string for equation, then parse numbers using loop, then make your calculations, at the end print them.
+ 4
This is not a big deal indeed. If you can tell us where you are stuck at this, we can help you.
+ 3
Thanks Mustafa K.
+ 2
From the start because i don't know where to start from, i have no idea on cpp right now