#include #include #include unsigned char hexvalue(char c) { if(c >= '0' && c <= '9') return(c-'0'); if(c >= 'A' && c <= 'F') return(c-'A'+10); if(c >= 'a' && c <= 'f') return(c-'a'+10); } main(int argc, char **argv) { int x,y,z; unsigned char c,d; c = fgetc(stdin); while(!feof(stdin)) { if(c == '+') putc(' ',stdout); else if(c == '%') { c = fgetc(stdin); x = hexvalue(c); c = fgetc(stdin); x = x*16+hexvalue(c); putc(x,stdout); } else putc(c,stdout); c = fgetc(stdin); } }