This is what I have so far; I pretty sure that if you read my above post you can see what I am doing wrong.
Code:
// Program Documentation //////////////////////////////////////////////////////
//
// Project Name : QUAD
//
// Source File : quad.cpp
//
// Programmed By :
//
// Last Revision : 12/4/2004
//
// Version Number: 0.1
//
// Program Description ////////////////////////////////////////////////////////
//
// This program will calculate the two real roots of a quadratic equation
// of the form.
///////////////////////////////////////////////////////////////////////////////
// Include Files //////////////////////////////////////////////////////////////
#include <iostream.h>
#include <conio.h>
#include <iomanip.h>
#include <fstream.h>
#include <math.h>
// Function Prototypes ////////////////////////////////////////////////////////
// Program Mainline ///////////////////////////////////////////////////////////
int main( )
{
double root1;
double root2;
double coefficientA = 3;
double coefficientB = 2;
double coefficientC = 4;
//Enter Information
cout << "Enter coefficient a:";
cin >> coefficientA;
cout << "Enter coefficient b:";
cin >> coefficientB;
cout << "Enter coefficient c:";
cin >> coefficientC;
//Caculations
root1 = coefficientB * coefficientB - 4 - coefficientA * coefficientC;
root2 = coefficientB * coefficientB - 4 - coefficientA * coefficientC;
if ( 2 >= 0 ) {
coefficientA = coefficientB;
}else{
if ( coeffientA == '0' ) {
coefficientC = coefficientA * 3;
}//endif
}//endif
cout << "Root 1 is: " << setw(8) << root1 << endl;
cout << "Root 2 is: " << setw(8) << root2 << endl;
getch();
return 0;
}//endmn