diff --git a/app/src/main/java/hexlet/code/games/Calc.java b/app/src/main/java/hexlet/code/games/Calc.java index e806cc1..b3b0733 100644 --- a/app/src/main/java/hexlet/code/games/Calc.java +++ b/app/src/main/java/hexlet/code/games/Calc.java @@ -26,8 +26,10 @@ public static String calcAction(int num1, int num2, String action) { result = num1 + num2; } else if (action.equals("*")) { result = num1 * num2; - } else { + } else if (action.equals("-")) { result = num1 - num2; + } else { + return null; } return String.valueOf(result); }