I am doing Java with input statements that does math. Ex: how many apples on hand? Input 200. How many apples required on stock? 300. Then it returns a statement of 100 apples are needed on order. I need a line in the code to return a 0 if the variable is a negative number . Ex 500 apples on hand, 400 required in stock, 0 needed on order instead of -100 needed on order. I’ve attached the code I have so far. Everything works, no errors, but I don’t want it to return a negative number.
https://assignmentspool.com/wp-content/uploads/2021/01/logo-300x60.png 0 0 Davie https://assignmentspool.com/wp-content/uploads/2021/01/logo-300x60.png Davie2019-06-30 14:34:202019-06-30 14:34:20Java with input statements