Skip to content

Commit

Permalink
update Calc
Browse files Browse the repository at this point in the history
  • Loading branch information
Asterroth committed Nov 13, 2023
1 parent 4dddec6 commit 3c350ee
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/src/main/java/hexlet/code/games/Calc.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3c350ee

Please sign in to comment.