#include #include #include "hamming.h" int main() { int i,j; int error_count=0; unsigned text,code; srand( (unsigned int) time(NULL)); for (i=0; i<=100000; i++) { //get a random 26-bit integer as the text text = lrand48() >> 6; code = encode(text); //flip each of the 31 code bits for (j=0; j<=30; j++) { code = code ^ (1<=50) exit(1); code = code ^ (1<