Hello forum friends
I just started learning C++ on my own and naturally its a bit tricky but the challlenge is kind of the point right. anyways I wrote "hello world" and than a simple program to multiply two numbers and then I decided to apply it to the quadratic equation and now I am stuck.
Right now the compiler gets to the
line before telling me that b is undefined in this function.
Here is my program so far:
I think the problem is mostly that I don't know how to properly format the equation itself in the variable to be returned ( hope that makes sense). It also looks like I will run into some problems with the cin.get/cin.ignore stuff too but the main thing I am struggling with is just getting that equation to spit out the answer.
using namespace std;
float a, b, c;
cout<<"let's solve a quadratic equation.\n\n";
cout<<"What is the coefficient of the first term? ";
cout<<"What is the coefficient of the second term? ";
cout<<"What is the constant? ";
I will keep playing with it but any help would be appriciated