I just spent a while writing a program that does quadratic equations. it gives you the solutions, and shows you the steps needed to get those solutions. the only thing you have to do is input a, b and c. this is great for checking your homework answers and showing where you went wrong. not much of a point to useing it to do the hw completely for you though because with most teachers you have to show work and all that. anyway, heres the source code:

#include <iostream>

#include <iomanip>

#include <cstring>

#include <windows.h>

#include <cmath>

using namespace std;

int main(){

cout << " WELCOME * QUADRAQUATION * WELCOME" << endl << endl;

int probnum, loopnum = 1;

cout << "Input Total Number of Equations: ";

cin >> probnum;

while (loopnum <= probnum){

float a = 0, b = 0, c = 0, x1 = 0, sqr1 = 0, sqr2 = 0, sqr3 = 0;

float sqrf = 0, neg = 0, pos = 0, div1 = 0, div2 = 0;

cout << "Input a, b and c Separated by Spaces: ";

cin >> a >> b >> c;

x1 = b/-1;

//STEP 1- SQR

sqr1 = b*b;

cout << "x=" << x1 << "+ [sqrt]" << sqr1 << "-4ac[/sqrt]" << endl;

//STEP 2- SQR

sqr2 = -4*a*c;

cout << "x="<<x1<<"+ [sqrt] "<< sqr1 << "+" <<sqr2 << "[/sqrt]" << endl;

//STEP3- SQR

sqr3 = sqr1 + sqr2;

cout << "x=" << x1 << "+ [sqrt]" << sqr3 << "[/sqrt]" << endl;

//STEP 4 (FINAL)- SQR

sqrf = sqrt(sqr3);

cout << "x=" << x1 << "+" << sqrf << endl;

//POSITIVE WORK

pos = x1 + sqrf;

cout << endl << "Positive Work:" << endl;

cout << "x="<<x1<<"+" << sqrf << endl;

cout << "x="<< pos << endl;

pos = pos / (2*a);

cout << "x=" << pos << endl<< endl;

//NEGATIVE WORK

neg = x1 - sqrf;

cout << "Negative Work:" << endl;

cout << "x="<<x1<<"+" << sqrf << endl;

cout << "x="<< neg << endl;

neg = neg / (2*a);

cout << "x=" << neg << endl <<endl;

Beep(500,500);

cout << "S = {" << neg << ", " << pos << "}" << endl;

loopnum = loopnum + 1;

system("Pause");

system("cls");

cout << " WELCOME * QUADRAQUATION * WELCOME" << endl << endl;

}

}

any suggestions??

#include <iostream>

#include <iomanip>

#include <cstring>

#include <windows.h>

#include <cmath>

using namespace std;

int main(){

cout << " WELCOME * QUADRAQUATION * WELCOME" << endl << endl;

int probnum, loopnum = 1;

cout << "Input Total Number of Equations: ";

cin >> probnum;

while (loopnum <= probnum){

float a = 0, b = 0, c = 0, x1 = 0, sqr1 = 0, sqr2 = 0, sqr3 = 0;

float sqrf = 0, neg = 0, pos = 0, div1 = 0, div2 = 0;

cout << "Input a, b and c Separated by Spaces: ";

cin >> a >> b >> c;

x1 = b/-1;

//STEP 1- SQR

sqr1 = b*b;

cout << "x=" << x1 << "+ [sqrt]" << sqr1 << "-4ac[/sqrt]" << endl;

//STEP 2- SQR

sqr2 = -4*a*c;

cout << "x="<<x1<<"+ [sqrt] "<< sqr1 << "+" <<sqr2 << "[/sqrt]" << endl;

//STEP3- SQR

sqr3 = sqr1 + sqr2;

cout << "x=" << x1 << "+ [sqrt]" << sqr3 << "[/sqrt]" << endl;

//STEP 4 (FINAL)- SQR

sqrf = sqrt(sqr3);

cout << "x=" << x1 << "+" << sqrf << endl;

//POSITIVE WORK

pos = x1 + sqrf;

cout << endl << "Positive Work:" << endl;

cout << "x="<<x1<<"+" << sqrf << endl;

cout << "x="<< pos << endl;

pos = pos / (2*a);

cout << "x=" << pos << endl<< endl;

//NEGATIVE WORK

neg = x1 - sqrf;

cout << "Negative Work:" << endl;

cout << "x="<<x1<<"+" << sqrf << endl;

cout << "x="<< neg << endl;

neg = neg / (2*a);

cout << "x=" << neg << endl <<endl;

Beep(500,500);

cout << "S = {" << neg << ", " << pos << "}" << endl;

loopnum = loopnum + 1;

system("Pause");

system("cls");

cout << " WELCOME * QUADRAQUATION * WELCOME" << endl << endl;

}

}

any suggestions??