I don't have a clue how to "break" this to actually return a negative square, but that is what I need to figure out. For example, the sqrt of -100 should be -10, but I just get the error telling me...
Type: Posts; User: jae5086
I don't have a clue how to "break" this to actually return a negative square, but that is what I need to figure out. For example, the sqrt of -100 should be -10, but I just get the error telling me...
What laser said :)
As soon as I posted I noticed my input was inside the if statement and that is why everything was thrown off.
Ok I have tried a few ways to get this loop to terminate before using the ending variable in the function but I cannot seem to figure it out. This is just my latest attempt. I want this program to...
Ok I figured this one out too. Using || when I should have been using &&. Let's hear it for logic!
/thread closed
To follow up, I figured out the reason why my else was popping up all the time, I used or (||) instead of and (&&) in my condition. Silly mistake.
So that leaves my (hopefully) final issue, the...
Salem, yes I just figured out that I needed the double =. Otherwise, I had not been getting an area and I really thought I had the == originally but probably was not using single quote with the char...
I am not getting that error, or any compiling error for that matter, though. It just asks for the operator the first time then keeps asking for a number (and not actually doing the math either).
I just recently started learning this stuff so I am sure I am doing something simple but I don't really notice a difference from my book examples. I am trying to have the program loop back to ask...
Done and works, thanks, we had not learned to combine else and if like that yet in class. The super secret government program of heroes thanks you....but I have said too much.
Does getline() work for all variables? I had only seen it used in conjunction with string variables and assumed that was all it was used for. Thanks for the elaboration by the way, all you guys on...
The following is a snippet from an application program. It ran fine through a few tests but when I used a 19 year old male (which should have satisfied the very first condition and been done with...
I was about to ask why the following code was skipping question three but I changed the getline statement to a cin and everything is fine now. I was hoping someone could explain why getline doesn't...
Thanks for the help guys. Dave, that did the trick and all is now well.
EVOE, I realized counter should have been an int but what do you mean about not using ++ with a double? My program was...
Ok, so the issue I am now having with this program is that the average calculation is incorrect. However, the equation itself is so simple it seems unlikely that I could be so bone-headed as to mess...
Ok, I am pretty sure I ran into that problem before. Hopefully with a little more practice I will remember to use == instead of = inside if statements. Thanks for the help
One problem down, a...
I understand 1.#INF represents infinity and I am sure the issue is simple, but I cannot for the life of me figure out what is causing it. The issue is when trying to find the average. Everything...