Question: Need help with this please 1- A quadratic equation for variable x is expressed as: ax2 + bx + c = 0, where a, b,

Need help with this please
1- A quadratic equation for variable x is expressed as: ax2 + bx + c = 0, where a, b, and c are the coefficients. The two roots of a quadratic equation can be calculated using the following quadratic formula: -b + b2 - 4ac - 2a For example, the roots of x2 3x - 4 = 0 are x = 4 and x = -1 a) Write a C++ program to solve the quadratic equation. Compare your answer with the example above. b) What are the datatypes that should be used in the program to represent the formula's coefficients? 2- The height of a cylinder is given by the following formula: S- - 2tr2 h= 2 Where: his height of the cylinder, s is the surface of the cylinder, and r is the radius. a) Write a C++ program to calculate the height of the cylinder, given the surface (s) and the radius (r)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
