So for my very first program I decided to make a quadratic formula solver. It works well but I am having problems with my loop. For some reason it repeats no matter what I enter. What am I doing wrong?
Also, how would I do this same kind of loop structure but with strings (I.E., type yes to do it again)?
You're defining n twice, and the compiler doesn't like it. I'd move all your variable declarations to the top of your program (where your first "int n" is).
And, it appears if you put "weird" numbers in, your program chokes on the sqrt() function (probably because you're trying to take the sqrt of a negative number). The output you're getting is just telling you you've ended up with an invalid/undefined result.
You'd use strings the same way you use the int, but with a string variable, and string comparators to process the user input. You'll have to do some stuff to make sure that you've covered all combinations of case, so that "yes" and "YES" and even "Yes" are accepted.
Do a little reading on strings, and I think you'll quickly get the hang of it. Try to use C++ style strings, which are an object, and not C style strings, which are just character arrays. Good habit to get into.