Hi! I'm trying to write a program that takes three values from the user, asks if he/she wants the largest or smallest number and then output said number. I also need a generic message to output if the numbers are the same. Any help is well appreciated, but please keep in mind that this is a entry level
java course and we haven't covered much yet so I'm still using if statements and such.
I have most of it down, it works when I ask for the greatest value and each value is different, but anytime I ask for the smallest value it gives me the largest, also it makes me type "no" twice(when asking for lesser value) to actually output the value. The program does, however, give the correct response when the numbers are the same, whether I ask for the greater or lesser value(still makes me type "no" twice.) While debugging, I see that the program functions normally until it gets to the "if boolean is true/false" part and effectively treats the if statements as commands instead of variable checks(i.e, "if boolean = true" becomes "boolean = true") This may not be the case since I don't really know what I'm doing but that's what it seems to me.
This is what I have so far:
Thanks very much for any help anyone can provide!
Cheers!
MArndt