user34344: I want to wrap a random number using modulo, so that values exceeding 11 starts over from 0 and greater. However, i would also like numbers less than 0 to dividend 11 or less.
Please correct me if i'm wrong, but as far as i can tell the modulo operator only dividends values exceeding the divisor. If so, how can i write code that also dividends values less than 0?

user4143: One crude way:
while (x > 11) x -= 11;
while (x < 0) x += 11;

The first could be replaced with a modulo operation.

user15180: Simply use modulo
#include <stdio.h>

int main(){
   for (int i = -23;i<23;i++) printf("%d    %d\n",i,i%11);
   return 0;
}

all modern C variants should work the same way https://en.wikipedia.org/wiki/Modulo_operation (result have same sign as divident):
-23 -1
-22 0
-21 -10
-20 -9
-19 -8
-18 -7
-17 -6
-16 -5
-15 -4
-14 -3
-13 -2
-12 -1
-11 0
-10 -10
-9  -9
-8  -8
-7  -7
-6  -6
-5  -5
-4  -4
-3  -3
-2  -2
-1  -1
0   0
1   1
2   2
3   3
4   4
5   5
6   6
7   7
8   8
9   9
10  10
11  0
12  1
13  2
14  3
15  4
16  5
17  6
18  7
19  8
20  9
21  10
22  0


for new formulation of request fixed by @Gerben suggestion
if you want monotonic 0..10 sequencies, add 11, if result is negative :
#include <stdio.h>

int main(){
for (int i = -23;i<23;i++)
    {
    int x= i%11 ;
    x += x<0?11:0;
    printf("    %d  %d\n",i,x);
    };
return 0;
}

results in 
-23 10
-22 0
-21 1
-20 2
-19 3
-18 4
-17 5
-16 6
-15 7
-14 8
-13 9
-12 10
-11 0
-10 1
-9  2
-8  3
-7  4
-6  5
-5  6
-4  7
-3  8
-2  9
-1  10
0   0
1   1
2   2
3   3
4   4
5   5
6   6
7   7
8   8
9   9
10  10
11  0
12  1
13  2
14  3
15  4
16  5
17  6
18  7
19  8
20  9
21  10
22  0


34344: <p>I want to wrap a random number using modulo, so that values exceeding 11 starts over from 0 and greater. However, i would also like numbers less than 0 to dividend 11 or less.</p>

<p>Please correct me if i'm wrong, but as far as i can tell the modulo operator only dividends values <em>exceeding</em> the divisor. If so, how can i write code that also dividends values less than 0?</p>
 4143: <p>One crude way:</p>

<pre><code>while (x &gt; 11) x -= 11;
while (x &lt; 0) x += 11;
</code></pre>

<p>The first could be replaced with a modulo operation.</p>
 15180: <p>Simply use modulo</p>

<pre><code>#include &lt;stdio.h&gt;

int main(){
   for (int i = -23;i&lt;23;i++) printf("%d    %d\n",i,i%11);
   return 0;
}
</code></pre>

<p>all modern C variants should work the same way <a href="https://en.wikipedia.org/wiki/Modulo_operation" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Modulo_operation</a> (result have same sign as divident):</p>

<pre><code>-23 -1
-22 0
-21 -10
-20 -9
-19 -8
-18 -7
-17 -6
-16 -5
-15 -4
-14 -3
-13 -2
-12 -1
-11 0
-10 -10
-9  -9
-8  -8
-7  -7
-6  -6
-5  -5
-4  -4
-3  -3
-2  -2
-1  -1
0   0
1   1
2   2
3   3
4   4
5   5
6   6
7   7
8   8
9   9
10  10
11  0
12  1
13  2
14  3
15  4
16  5
17  6
18  7
19  8
20  9
21  10
22  0
</code></pre>

<hr>

<p>for new formulation of request fixed by @Gerben suggestion</p>

<p>if you want monotonic 0..10 sequencies, add 11, if result is negative :</p>

<pre><code>#include &lt;stdio.h&gt;

int main(){
for (int i = -23;i&lt;23;i++)
    {
    int x= i%11 ;
    x += x&lt;0?11:0;
    printf("    %d  %d\n",i,x);
    };
return 0;
}
</code></pre>

<p>results in </p>

<pre><code>-23 10
-22 0
-21 1
-20 2
-19 3
-18 4
-17 5
-16 6
-15 7
-14 8
-13 9
-12 10
-11 0
-10 1
-9  2
-8  3
-7  4
-6  5
-5  6
-4  7
-3  8
-2  9
-1  10
0   0
1   1
2   2
3   3
4   4
5   5
6   6
7   7
8   8
9   9
10  10
11  0
12  1
13  2
14  3
15  4
16  5
17  6
18  7
19  8
20  9
21  10
22  0
</code></pre>
