2020年4月24日
摘要: #include <stdio.h> int main() { printf(" 打印输入字符频度的直方图 \n"); unsigned int ws[128]; // 字符频度数组。 int i, j, c; i = j = c = 0; // 默认每个字符出现0次。 for (i = 0; i 阅读全文
posted @ 2020-04-24 19:55 杪杪 阅读(342) 评论(0) 推荐(0)
摘要: /*水平方向的直方图*/ 1 #include <stdio.h> 2 #define MAXHIST 15 3 #define MAXWORD 11 4 #define IN 1 5 #define OUT 0 6 7 int main() 8 { 9 10 int c, i, nc, state 阅读全文
posted @ 2020-04-24 15:56 杪杪 阅读(505) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #define IN 1 3 #define OUT 0 4 5 int main() 6 { 7 int c, state; 8 state = OUT; 9 10 while( (c = getchar()) != EOF) 11 12 { 13 i 阅读全文
posted @ 2020-04-24 11:06 杪杪 阅读(429) 评论(0) 推荐(0)
  2020年4月23日
摘要: 1 #include <stdio.h> 2 3 #define IN 1 4 #define OUT 0 5 6 /*统计各个数字、空白符及其他字符出现的次数*/ 7 8 int main() 9 { 10 int c, n1, nw, nc, state; 11 12 state = OUT; 阅读全文
posted @ 2020-04-23 22:31 杪杪 阅读(400) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 int c; 6 while ((c=getchar())!=EOF){ /*判断输入字符是否为文件结束符*/ 7 if (c=='\t') /*如果输入字符为制表符*/ 8 阅读全文
posted @ 2020-04-23 21:54 杪杪 阅读(664) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 int space=0, tab=0, line=0, c; 6 while ((c=getchar())!=EOF){ 7 if (c==' ') 8 ++space; 9 阅读全文
posted @ 2020-04-23 21:49 杪杪 阅读(453) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 printf("%d\n", EOF); 6 system("pause"); 7 return 0; 8 } 阅读全文
posted @ 2020-04-23 21:46 杪杪 阅读(836) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 int main() 4 { 5 int c, space=0; 6 while ((c=getchar())!=EOF){ 7 if (c==' ') 8 ++space; 9 else 10 space=0 阅读全文
posted @ 2020-04-23 21:39 杪杪 阅读(338) 评论(0) 推荐(0)
  2019年12月3日
摘要: #运算符 #运算符用于在预处理期将宏参数转换为字符串 #的转换作用是在预处理期完成的,因此只在宏定义中有效 编译器不知道#的转换作用 1 #define STRING(x) #x2 printf("%s\n",STRING(Hello World!)); ##运算符 ##运算符用于在预处理期粘连两个 阅读全文
posted @ 2019-12-03 15:22 杪杪 阅读(379) 评论(0) 推荐(0)
  2019年11月24日
摘要: 设有一组正态分布的观测值样本,按其大小顺序排列为x1,x2,x3,...,xn。其中最小值x1或最大值xn为离群值(xout)。对于离群值的统计检验,大多是建立在被检测的总体服从正态分布。基于此,在给定的检出水平或显著水平a(通常取值为0.05和0.01)和样本容量n条件下,可查表获得临界值,在通过 阅读全文
posted @ 2019-11-24 15:27 杪杪 阅读(9008) 评论(0) 推荐(0)