I'm a newbie and this is probably a simple fix. But hopeful help will help me advance. So anyways here it is. I'm getting a bunch of errors and now I'm lost as to what I need to fix.
[code][/code] tags please! Also, you stole my old alias :(
As far as code goes, you're not using the equality operator '==', but instead the assignment operator '=' to check conditions, so right now al of your if statements are true. Remember, programs execute chronologically, so get your input before you check it! Also, a switch statement would probably be better here.
Thank you. I didn't do the switch statement, cause I don't know how to phrase it. But I almost got it working. Right now it will run but it will only multiply the last two inputted variables no matter what I set it two
if(x = "+");
This has two problems:
1) This will assign "+" to the variable xif(x == '+');
This fixes it
2) If you use "+" instead of '+' (single quotes are correct; double quotes are not), then it will try to check a 1-byte char against a two-byte + followed by a \0 (null or zero bit) ending.
There are other assignment errors in the rest, but pointing this out, you should be able to see where those mistakes occurred.
edit: beaten.
if(x == '-');
You have a semi-colon at the end of your if statement. Get rid of it and test.