Quadratic
public cpp v1 · immutable#include <iostream>#include <math.h> //sqrootusing namespace std;void quadratic (float, float, float, float &x1, float &x2);int main(){ float a, b, c, x1, x2; cin >> a; cin >> b; cin >> c; quadratic(a,b,c,x1,x2); cout << x1 << endl << x2 <<endl; return (0);}void quadratic(float a, float b, float c, float &x1, float &x2) { x1 = (((-b) + sqrt((b*b) - (4*a*c))) / (2*a)); x2 = (((-b) - sqrt((b*b) - (4*a*c))) / (2*a));}