学习C:打印输入中单词长度的水平方向直方图
摘要:
#include #define IN 1#define OUT 0#define MAXWL 16 main() { /*打印输入单词长度的水平直方图*/ int c,i,state,n,k; n = 0;//统计单词长度 int nwl[MAXWL]; state = OUT; for(i = 0;i < MAXWL;i++) nwl[i] = 0; while((c = getchar())!= EOF) { if(c == ' '||c == '\n'||c == '\t') state = OUT; else if(state = 阅读全文
posted @ 2013-11-19 23:49 huiabu 阅读(341) 评论(0) 推荐(0)
浙公网安备 33010602011771号