Man, you've been more than enough help. Really it means a lot. I've been pegging away at this all week and it's due tonight at 1am CST (online class). I still have several hours to peg away at it...
Type: Posts; User: mcweezle
Man, you've been more than enough help. Really it means a lot. I've been pegging away at this all week and it's due tonight at 1am CST (online class). I still have several hours to peg away at it...
I see part of the problem.. I have temp2 = 0, but then i ask it to replace the value of temp 2 with number if number is less than 0. I'm trying to rewrite that part now.
Section B requires a sentinel to flag the end of user input. The user has to be able to enter any amount of number and end with -99. Then it should display the proper results.
No. With the snippet of code you showed me, it returns -99 as the smallest number. I inserted a && != SENTINEL in the if staement and now it only returns a ) value. :(
Okay. Here is the updated code.
Section B returned -99 as the smallest value, so I added the != Sentinel in the if statement and now it returns 0 again.
You've been a BIG help man. More...
DUDE!!! :cool:
I am so dancing a jig in my living room right now! the brackets in the for statement worked!!!
You are so awesome. I can't believe I didn't think of that!
*Super-long-distance...
There in lies the apparent problem though... I don't know what an array is.
Shouldn't my if statement save only the highest value?
if (number > temp1)
temp1 = number;
See that's my problem. We haven't covered arrays yet, so to include it would be just wrong.
Is there any way of doing this in a while, for, or do.. while loop.... or even an if / else statement?
...
Okay,
I have to create a menu ( which I did) and have 3 options. (done) In option A I have to allow the user to enter how many numbers he wants to input (a limit). Then after that limit of numbers...