Last active
August 26, 2025 08:36
-
-
Save michaelkotor/ed99907d23ad708e2115798c61e9a9d7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| You are given a story from Product Owner. He wants to integrate a calculator to the banking app. You may ask clarification quiestions in needed. | |
| You need to write a prodcution-ready function public int calculate(int a, int b, char operator). | |
| This method should return the result of applying the operator to the two numbers. | |
| Supported operators are '+' for addition, '-' for subtraction, '*' for multiplication, and '/' for division. | |
| For example: calculate(4, 2, '+') should return 6, calculate(10, 3, '-') should return 7, calculate(3, 5, '*') should return 15, and calculate(8, 2, '/') should return 4. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment