OK I've just wrote something to fill some time, and I thought I had done it all right, but when I try compile it, it gives some errors, but the errors don't make much sense to me really. It's giving error messages like ' and (each.
I'm pretty new so I have no idea what they're on about so I was hoping someone on here could help me.
That's the source and the errors on lines 39 and 40 are in notes at the side.
using namespace std;
int main (int argc, char *argv)
cout << "Works out two values of X in Quadratic Formulas (ax^2+bx+c=0)" << endl;
cout << "Integers only" << endl;
//Declare A,B,C,negative B, answer to both top and bottom halfs, number to be square rooted and the SQRT.
//Also declares answers.
//Put values for A.B & C into the program.
cout << "Enter A" << endl;
cin >> A;
cout << "Enter B" << endl;
cin >> B;
cout << "Enter C" << endl;
cin >> C;
//Work out Negative B, the number to be SQRTed, the SQRT and the numbers to be divided
NegB = B*-1;
InRoot = (b*b)-(4*A*C); // Gives ' and (each
Root = sqrt(InRoot); //Gives call
TopHalfP = NegB+Root;
TopHalfN = NegB-Root;
BottomHalf = 2*A;
AnswerP = TopHalfP/BottomHalf;
AnswerN = TopHalfN/BottomHalf;
cout << "The answers for X are:" << endl;
cout << AnswerP << endl;
cout << "And" << endl;
cout << AnswerN << endl;
cout << "Press ENTER to continue..." << endl;
It also gave some errors on lines in the hundreds, though this only gets to about 60 lines. I've put them in the image.
If anyone could help with any of these it would be great.