My program seems to work just fine except for one small thing. If I enter numbers other than what makes the condition right, it still displays "Inventory code" and "invalid output." Ideally, it would just display "invalid output" without a blank inventory code.
To begin, this really should be upgraded to switch statements, and the validation should be done with a while statement.
Nonetheless, if you want to keep your code similar to what you have, then you'll need a Boolean that is set to true by default, and is switched to false if anything fails. Then on your final statements, you just need to wrap it in an if statement checking that Boolean.
And please wrap you code in [code] tags when posting.