diff --git a/gitops/gitee/Mod.java b/gitops/gitee/Mod.java new file mode 100644 index 0000000000000000000000000000000000000000..86b2871f6e7074b6dee18b292598ec369182f1a9 --- /dev/null +++ b/gitops/gitee/Mod.java @@ -0,0 +1,14 @@ +package gitops.gitee; + +class Mod implements ICalculate{ + + private double result; + public double calculate(double m, double n){ + if(0==n){ + System.out.println("ERROR: % by zero!"); + return 0.0; + } + result= (int)m%(int)n; + return result; + } +} \ No newline at end of file