Hi there and hello, I am new to C++ and these forums so bare with me please.
The objective of this program is to get a real number from the user between 1 and 100. If the number is less than or equal to 50, then square it. If it is great than 50, to calculate the square root. If the number is outside of the required range, output an error message.
Your condition statements are incorrect. On each side of the || and && you need valid boolean statements, and < 1 isn't valid. Try instead num > 100 || num < 1, for example, on line 21.
What were you trying to accomplish with the braces on lines 23 and 28? Where they meant to be wrapping an else clause?
Wow, thank you for pointing that out. I feel so dumb that I couldn't see it myself.
and the braces.. I was receiving a "else without if" error earlier, and I was trying all kinds of things. When I fixed it I just forgot to remove them. I see now they are not necessary. Thank you so much!