Code: Alles auswählen
#include <stdio.h>
int e [] = {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 f [42];
int main (void) {
int i, j;
int a;
int c;
int m;
int x;
x = 32;
m = 35;
for (c = 0; c < 256; c++) {
for (a = 0; a < 256; a++) {
for (i = 0; i < 36; i++) {
f [i] = x;
x = ((a*x + c) % m+18) % m;
}
for (j = 0; j < 16; j)
if (e [j*2] != f [j])
break;
if (j > 4) {
for (j = 0; j < 32; j++)
printf ("%i ", f [j]);
printf ("Bingo!!!");
j = 0;
}
}
}
return 0;
}