Im getting invalid answers to the problems. For example if I set B=-3 , A=1 , and C=-4 I get -17 when I should be getting 25. Anyone mind telling me why?
1 2 3 4 5 6 7 8 9 10 11 12 13 14
int B;
int A;
int C;
cout<<"We Are Going To Calculate The Amount Of Solutions And The Amount Of X Intercepts"<<endl;
cout<<"Enter B's Value: ";
cin>>B;
cout<<"Enter A's Value: ";
cin>>A;
cout<<"Enter C's Value: ";
cin>>C;
int Answer=B^2-4*A*C;
cout<<"It Equals "<<Answer<<endl;
cin.ignore();
cin.get();
My solution was more general and handles all cases; there is no reason to be growling about anything regardless of which way you choose to solve the problem.