Hey guys, a bit of a C++ beginner here, just need some help figuring out where to add a while loop that will ask the user if they want to solve another equation with a (y/n). Code below works and looks like it supposed to, just need a loop in here. Any help would be awesome.
Thanks for the reply if i want it to recognize a capital "Y" and also the lower case "y" , how would i set that variable up? I know it has to do with the ll command. Would it be something like this?
When dealing with the || (Logical OR) operator (and every other operator for that matter), each statement is separate from the other. You must say it twice, as in: while (another_calc == 'y' || another_calc == 'Y')
Edit: Also that isn't how you initialize a char, (x || y) returns a bool, not a char. Just declare it and you can initialize it using cin as you seem to already be doing.
For some reason i just cant get a normal while loop to work. If someone could edit the code for a normal while loop that would be cool, id like to see both.