We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd354a0 commit 191542fCopy full SHA for 191542f
src/main/java/com/thealgorithms/Calculator.java
@@ -0,0 +1,8 @@
1
+package com.thealgorithms.misc;
2
+
3
+public class Calculator {
4
+ public int add(int a, int b) { return a + b; }
5
+ public int subtract(int a, int b) { return a - b; }
6
+ public int multiply(int a, int b) { return a * b; }
7
+ public double divide(int a, int b) { return (b != 0) ? (double)a / b : 0; }
8
+}
0 commit comments