/media/sda-magnetic/david/Dok-15-2023-11-27/informatik/roulette-tries-2023-10-30/roul2.c


#include <stdio.h>

int a [] = {0, 32, 15, 19, 4, 21, 2, 25, 17, 34, 6, 27, 13, 36, 11, 30, 8,  23, 10, 5, 24, 16, 33, 1, 20, 14, 31, 9, 22, 18, 29, 7, 28, 12, 35, 3, 26};

int sum (int begin, int end) {
    int i;
    int c;

    c = 0;
    for (i = begin;  i < end;  i++) {
        c += a [i%37];
    }
    printf ("%i %i %i\n", c, begin%37, end%37);
}

int main (void) {

int i;

for (i = 0;  i < 37;  i++) {  
  sum (i+0, i+19);
  sum ((i+20), i+37);
}

return 0;
}