Original formulation is given here (you can try also your program for correctness) .
Additional rules:
1. The program should read from standard input and write to s
Here's a way to reduce the code down to 76 chars:
main(c){read(0,&c,1)?c-41&&main(c-40&&putchar(c,c%96>26&&main(c))):exit(0);}
A longer, commented version for clarity:
int main(int c)
{
if (read(0,&c,1)) { /* read char */
if (c-41) { /* if not ')' */
if (c-40) { /* then if not '(' */
if (c%96>26) { /* then if operator (not alphabet or ) */
main(c); /* recurse */
}
putchar(c); /* print */
}
main(c); /* recurse */
}
} else exit(0); /* end program */
}