home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!pipex!warwick!coventry!champion
- From: champion@cch.coventry.ac.uk (Alun)
- Subject: Re: A different C puzzle
- Message-ID: <C0DKAx.I8A@cck.coventry.ac.uk>
- Sender: news@cck.coventry.ac.uk (news user)
- Nntp-Posting-Host: cc_sysh
- Organization: Coventry University, Coventry, UK.
- References: <768@ulogic.UUCP> <1992Dec23.092712.2408@sq.sq.com> <1992Dec23.185348.19343@sharebase.com>
- Date: Tue, 5 Jan 1993 09:42:33 GMT
- Lines: 40
-
- In article <1992Dec23.185348.19343@sharebase.com> keith@torme.sharebase.com (Keith Chambless) writes:
- ~In article <1992Dec23.092712.2408@sq.sq.com> msb@sq.sq.com (Mark Brader) writes:
- ~>> > Write a [C] program that uses every valid character exactly once.
- ~>> I should think it would be rather difficult to use only one " ...
- ~
- ~Best I could come up with is:
- ~
- ~#
- ~
- ~main()
- ~{
- ~ double *ABCDEFGHIJKLMNOPQRSTUVWXYZ[],
- ~ c_fghjkpqrstvwxyz = -!9 + 8.0 / 7 > 6 < 5 % 4 ? 3 : 2 & 1;
- ~}
- ~
- ~
- ~missing are ' " \
-
- What about ^ | ~
- Also it doesn't seem to compile - it complains about no size for the array.
-
- #
- double *ABCDEFGHIJKLMNOPQRSTUVWXYZ[],
- c_fghjkpqrstvwxyz = -!9 ^ +8. / 7 > 6 < 5 % 4 ? 3 : 2 & 1 | ~0;
-
- main()
- { }
-
- Sticking the double as global does compile with gcc -ansi and I have added the
- other operators.
-
- I can't see any way of gettting the ' " \ into the program.
-
- -Alun
-
- --
- *I'm as bad as the worst - but thank God(?) I am as good as the best.*
- *People who think they know everything annoy those of us that do.*
- A.Champion | That's an interesting point, in the sense of
- (champion@uk.ac.cov.cch) | being very not interesting at all. - The Liar
-