Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uflorida!haven!aplcen!bink From: bink@aplcen.apl.jhu.edu (Ubben Greg) Newsgroups: comp.misc Subject: Re: programming challenge (really silly) Keywords: dc factorial Message-ID: <881@aplcen.apl.jhu.edu> Date: 17 Mar 89 03:44:34 GMT References: <2102@jasper.UUCP> <93227@sun.uucp> Reply-To: bink@aplcen.apl.jhu.edu (Greg Ubben 301-768-9780) Distribution: na Organization: DoD Lines: 21 In article <93227@sun.uucp> landauer@sun.UUCP (Doug Landauer) writes: >Anyway, I haven't seen any other postings that solve this silly >challenge (to write a little factorial program) in as few characters as >does this 76-character shell/dc/sed script: >---- >dc<[[error]pq]se`head -1`dsnd1>ed9---- >Can anyone improve this further? Being somewhat of a {sh,sed,dc,awk,etc} fanatic, I couldn't resist playing with Doug's script, coming up with the following version which is only 53 characters long (if you remove the trailing newline): ?[[error]pq]sad1>ad9