Xref: utzoo comp.lang.c:17362 comp.sys.amiga.tech:4461 comp.lang.modula2:1388 comp.lang.pascal:1671 rec.humor:20333 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!leah!itsgw!steinmetz!crdgw1!uunet!microsoft!t-iaind From: t-iaind@microsoft.UUCP (Iain Davidson) Newsgroups: comp.lang.c,comp.sys.amiga.tech,comp.lang.modula2,comp.lang.pascal,rec.humor Subject: Another Silly programming puzzle.... Summary: Another Silly programming challange !!! Keywords: contest silly Message-ID: <1210@microsoft.UUCP> Date: 3 Apr 89 00:50:08 GMT Reply-To: t-iaind@microsoft.UUCP (Iain Davidson) Organization: What organization?? I just work here.... :) Lines: 51 (This is my first BIG post, so if you want to flame, flame low and send away) For those still silly over the LAST puzzle/challange.... here's another one. Puzzle: Write a "simple" program to convert rec.humor (rot13) jokes to a output readable by human eyes... Simple rules: 1) It works. 2) I can understand it. 3) Sources in "C", Pascal, MOD-2, Pilot, or csh-source format are acceptable. Two catagories. a) fastest b) smallest (least # of characters not including standard_IO includes or main(arg,arg) {} code, and ignoring white space '/n', (CR's,LF's,etc) for readablity. Two levels of difficulty: 1) using builtin functions of a OS i.e. ">" "<" for UNIX 2) using standard file operations of open/close. Here's an example ( not working and NOT tested, only by my limited knowledge of c ) main() { char c; while((c=getchar()!=EOF) if( (('a' < c) && ('z' > c)) || (('A' < c) && ('Z' > c)) ) { c=lower(c); putchar( (c>'m' : c-13 ? c+13) ); } } (I'll summurize and post results..., good luck and may the gods go with you...) Iain Davidson, formally of (Bellingham, WA)'s BelAmi! Fame UUCP: {uucp|uw-beaver}!microsof!t-iaind (How did he move that "t" ???) BITNET: microsof!t-iaind@beaver.cs.washington.edu for really smart mailers: t-iaind@microsoft.BITNET or .CSNET or .UUCP ********** Disclaimer: ********* My employer and fellow employees will (have, has) disclaim anything I say past, future, or present...... so there !!!!.... :P -----------------------------------------------------------------