#include <stdio.h>
int main(void)
{
struct
{
unsigned int bit_0: 1;
unsigned int bit_1: 1;
unsigned int bit_2: 1;
unsigned int bit_3: 1;
} decimal;
printf("Introduce un número en base decimal del 1 al 15: ");
scanf("%d", &decimal); //warning, pero funciona.
printf("%d", decimal.bit_3);
printf("%d", decimal.bit_2);
printf("%d", decimal.bit_1);
printf("%d", decimal.bit_0);
return 0;
}