summaryrefslogtreecommitdiff
path: root/src/hexout.c
blob: 1af6805ab391cb2c182fa563a47b2d5be3585c9b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <stdio.h>

int main() {
 char tbl[] = "0123456789ABCDEF";
  int in;

  while( ( in = getchar() ) != EOF ) {
    putchar( tbl[in>>4]);
    putchar( tbl[in&15]);
    putchar( '\n' );
  }
  return 0;
}