Article View: sci.crypt
Article #1372Re: Letter Frequency
From: Kees Huyser
Date: Fri, 16 Oct 1992 10:48
Date: Fri, 16 Oct 1992 10:48
24 lines
1061 bytes
1061 bytes
-----------------------<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 *
Technical Details
Message-ID:
<1992Oct16.104858.12286@paramount.nikhefk.nikhef.nl>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!nikhefk!keeshuReferences:
<1992Oct15.181530.3802@a.cs.okstate.edu>Show Full Headers
Complete Article Headers
Newsgroups: sci.crypt,alt.security Path: arc1-ca.pugleaf.net!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