home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky sci.crypt:3821 alt.security:4581
- Newsgroups: sci.crypt,alt.security
- Path: sparky!uunet!mcsun!sun4nl!nikhefk!keeshu
- From: keeshu@paramount.nikhefk.nikhef.nl (Kees Huyser)
- Subject: Re: Letter Frequency
- Message-ID: <1992Oct16.104858.12286@paramount.nikhefk.nikhef.nl>
- Organization: the National Institute for Nuclear Physics and High Energy Physics; the Netherlands
- References: <1992Oct15.181530.3802@a.cs.okstate.edu>
- Date: Fri, 16 Oct 1992 10:48:58 GMT
- Lines: 24
-
- -----------------------<snip>--------------------
- #include <stdio.h>
-
- int freq[256] = { 0 };
-
- main()
- { int c;
-
- while((c = getchar()) != EOF)
- { freq[c]++;
- }
- for(c = 'a'; c <= 'z'; c++)
- { printf("%d\t%c\n", freq[c], c);
- }
- }
- -----------------------<snip>--------------------
-
- try this,
- --kees
- --
- * Kees Huyser (System Adminstrator and resident Macintosh Guru ) *
- * internet: keeshu@paramount.nikhefk.nikhef.nl AppleLink: HOL0397 *
- * The National Institute for Nuclear Physics and High-Energy Physics, CSG/K *
- * P.O.Box 4395, 1009 AJ Amsterdam, The Netherlands, phone:+31205922132 *
-