Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site ucla-cs.ARPA Path: utzoo!watmath!clyde!bonnie!akgua!whuxlm!harpo!decvax!decwrl!greipa!pesnta!hplabs!sdcrdcf!trwrb!trwrba!cepu!ucla-cs!did From: did@ucla-cs.UUCP Newsgroups: net.jokes Subject: Re: Saving rotated jokes unrotated Message-ID: <5698@ucla-cs.ARPA> Date: Tue, 28-May-85 00:10:23 EDT Article-I.D.: ucla-cs.5698 Posted: Tue May 28 00:10:23 1985 Date-Received: Sat, 1-Jun-85 01:27:26 EDT References: <184@weitek.UUCP> <2398@mit-hermes.ARPA> Organization: UCLA Computer Science Department Lines: 18 OK, you asked for it. Here's my stylistic (:-) rotating/de-rotating program. Reads from stdin and writes to stdout. #include #include main(argc, argv) register char **argv; { register int c; for(;;) putchar((c = getc(stdin)) == EOF ? exit(0) : isalpha(c) ? isupper(c) ? 'A' + (c + 13 - 'A') % 26 : 'a' + (c + 13 - 'a') % 26 : c); }