Roots of the quadratic equation when a + b + c = 0 without using Shridharacharya formula | C ++ implementation of the approach ; Function to print the roots of the quadratic equation when a + b + c = 0 ; Driver code
#include <bits/stdc++.h> NEW_LINE using namespace std ; void printRoots ( long a , long b , long c ) { cout << 1 << " , ▁ " << c / ( a * 1.0 ) ; } int main ( ) { long a = 2 ; long b = 3 ; long c = -5 ; printRoots ( a , b , c ) ; return 0 ; }