/* * @(#) wl_hgram.c - Text words length histogram calculator. * (c) 1995 Ivan Maidanski http://ivmai.chat.ru * Freeware program source. All rights reserved. ** * Language: ANSI C * Tested with: BSD GNU CC * Last modified: 1995-10-28 14:50:00 GMT+04:00 */ #include #include #define MAXWORD 20 #define WIDTH 40 typedef unsigned int twordcount; typedef int tchar; typedef enum {IN,OUT} tinout; main () { twordcount wlen[MAXWORD]; twordcount i,j,max=0,overflow=0; tinout status=OUT; tchar ch; for (i=0;imax) max=wlen[i]; if (max0;j--) printf("*"); printf("\n"); } printf("\n"); return 0; }