/***************************************************************************** * Calculates the roots of a quadratic equation. * * Inputed: a, b, c such that ax^2+bx+c=0 * * Outputed: x, y (the values of x to make the above equation true) * * Written: September 18, 2001 * * By: Ronald Roberts * *****************************************************************************/ //Program 6 //18SEP01 #include #include int main() { /* declaration of variables */ double a=0, b=0, c=0, x=0, y=0; /* instruction statements and user input */ cout<<"This program is used to calculate the roots of qradratic equations by using the quadratic equation."<>a; cout<<"Please enter B:"<>b; cout<<"Please enter C:"<>c; /* calculation code */ x=(-b+sqrt((pow(b, 2)-4*a*c)))/2.0*a; y=(-b-sqrt((pow(b, 2)-4*a*c)))/2.0*a; /* output results */ cout<<"The roots are "<