Find the quadratic equation from the given roots | Java implementation of the above approach ; Function to find the quadratic equation whose roots are a and b ; Driver code
class GFG { static void findEquation ( int a , int b ) { int sum = ( a + b ) ; int product = ( a * b ) ; System . out . println ( " x ^ 2 ▁ - ▁ ( " + sum + " x ) ▁ + ▁ ( " + product + " ) ▁ = ▁ 0" ) ; } public static void main ( String args [ ] ) { int a = 2 , b = 3 ; findEquation ( a , b ) ; } }