Check whether one root of the Quadratic Equation is twice of other or not | C ++ program to check if one root of a Quadratic Equation is twice of other or not ; Function to find the required answer ; Driver code
#include <iostream> NEW_LINE using namespace std ; void checkSolution ( int a , int b , int c ) { if ( 2 * b * b == 9 * a * c ) cout << " Yes " ; else cout << " No " ; } int main ( ) { int a = 1 , b = 3 , c = 2 ; checkSolution ( a , b , c ) ; return 0 ; }