text: Generate Quadratic Equation having given sum and product of roots | C ++ program for the above approach ; Function to find the quadratic equation from the given sum and products of roots ; Print the coefficients ; Driver Code
code: #include <bits/stdc++.h> NEW_LINE using namespace std ; void findEquation ( int S , int M ) { cout << "1 ▁ " << ( -1 ) * S << " ▁ " << M << endl ; } int main ( ) { int S = 5 , M = 6 ; findEquation ( S , M ) ; return 0 ; }