Roots of the quadratic equation when a + b + c = 0 without using Shridharacharya formula | Java implementation of the approach ; Function to print the roots of the quadratic equation when a + b + c = 0 ; Driver Code
class GFG { static void printRoots ( long a , long b , long c ) { System . out . println ( 1 + " , ▁ " + c / ( a * 1.0 ) ) ; } public static void main ( String [ ] args ) { long a = 2 ; long b = 3 ; long c = - 5 ; printRoots ( a , b , c ) ; } }