/* * prueba_crear_mascara.c * * Created on: 26 mar. 2018 * Author: alcarraz */ #include #include "bits.h" #define NBITS 8 #define NPRUEBAS ((NBITS)*(NBITS+1)/2) unsigned char esperados[][8] = { {0b1}, /*max=0*/ {0b11, 0b10}, /*max=1*/ {0b111, 0b110, 0b100}, /*max=2*/ {0b1111, 0b1110, 0b1100, 0b1000}, /*max=3*/ {0b11111, 0b11110, 0b11100, 0b11000, 0b10000}, /*max=4*/ {0b111111, 0b111110, 0b111100, 0b111000, 0b110000, 0b100000}, /*max=5*/ {0b1111111, 0b1111110, 0b1111100, 0b1111000, 0b1110000, 0b1100000, 0b1000000}, /*max=6*/ {0b11111111, 0b11111110, 0b11111100, 0b11111000, 0b11110000, 0b11100000, 0b11000000, 0b10000000}/*max=7*/ }; int main() { int min,max; unsigned char aciertos = 0; for (max=0; max