The issue i am having is initializing the math problem. cannot use string or if. must be able to just put in a simple math problem 8+8 and it will display the answer 16
On line 26, you have (x + y == z);
This isn't doing anything useful. Nothing. Nada. It is making a comparison of the addition of two uninitialized variables to a third, uninitialized variable.
By the way, variable names like "a" and "b" are very unclear names.
x, y, and z are all still uninitialized when you try to display them.
I'll start you off with this:
1 2 3 4 5 6 7 8 9 10 11 12 13
float x, y, z;
char math_operator;
cout << "Enter a simple math expression (ex: 3 + 2): " << endl;
cin >> x >> math_operator >> y;
switch (math_operator)
{
case'+':
z = x + y;
// ...
break;
//case default: // etc.
}