It's okay, happens to the best of us. Part of the learning experience.
Type: Posts; User: KevinWorkman
It's okay, happens to the best of us. Part of the learning experience.
Right, switch statements can sometimes be used instead of if statements. But they don't really work in the case of ranges, which is what the OP has, so it's not really a great suggestion. It will...
You should have started your own thread, with a link to this one. Oh well, here we are now.
I suggest you write down all of the numbers, then write which index it should map to. Do you see a...
That doesn't really eliminate if statements then. I appreciate you trying to help, but please don't offer suggestions if they're only guesses- or at least include a disclaimer that you're just...
How would that help with the range of values that the OP is using?
djl- the short answer to your question is "yes". What have you tried?
Your compiler is looking for a class named Main. I don't see one here. How are you trying to compile this?