#include main() { int code; int i; int threshold; code = (int) getchar(); for (i = 0, threshold = 128; i < 8; i++) { if (code < threshold) printf("0"); else { printf("1"); code = code - threshold; } threshold = threshold / 2; } printf("\n"); }