From 60fde85b647fcc006b67d0a6a8f5e185dd6b66eb Mon Sep 17 00:00:00 2001 From: erdgeist <> Date: Wed, 17 Oct 2007 11:52:41 +0000 Subject: hex Out\! --- src/hexout.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/hexout.c (limited to 'src') diff --git a/src/hexout.c b/src/hexout.c new file mode 100644 index 0000000..1af6805 --- /dev/null +++ b/src/hexout.c @@ -0,0 +1,13 @@ +#include + +int main() { + char tbl[] = "0123456789ABCDEF"; + int in; + + while( ( in = getchar() ) != EOF ) { + putchar( tbl[in>>4]); + putchar( tbl[in&15]); + putchar( '\n' ); + } + return 0; +} -- cgit v1.2.3