good day,
what is the best way to implement the below function in java:
mod11(x) which calculates x mod 11, we assume x is either an integer or a formula. For example, mod11(14) returns 3, and mod11(3\*7-30) returns 2.
I tried the below but it didn't work:
`

```
public static int PositiveMod(int value, int mod)
    {
        return ((value % mod + mod) % mod);
    }

```

`

`

```
public static double PositiveMod(double value, double mod)
    {
        return ((value % mod + mod) % mod);
    }

```

`
for example, i expect ((-7+1)/20) mod 11 to give out 3 but instead it gave me 10.7
like below
i = ((-7+1)/20) mod 11 = -6/9 mod 11 = 5\*5 mod 11 = 3