上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 45 下一页
摘要: 3.比较两个文本文件是否相等:比较两个文本文件的内容是否相同,并输出两个文件中第一次出现不同字符内容的行号及列值。 #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main(void){ int row, column; c 阅读全文
posted @ 2021-09-29 11:47 就是想学习 阅读(115) 评论(0) 推荐(0)
摘要: 第二题 将实数写入文件:从键盘输入若干实数(以特殊数值-1结束),分别写到一个文本文件中。 #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main(void){ double number; FILE *fp; if (( 阅读全文
posted @ 2021-09-29 11:06 就是想学习 阅读(303) 评论(0) 推荐(0)
摘要: 第一题:统计文本文件中各类字符个数:分别统计一个文本文件中字母、数字及其其它字符的个数。 #include <stdio.h> #include <stdlib.h> #include <ctype.h> int main(void){ int alphabet, digit, other; cha 阅读全文
posted @ 2021-09-29 10:46 就是想学习 阅读(189) 评论(0) 推荐(0)
摘要: #include <string.h> #include <stdlib.h> #include <stdio.h> long size; struct LogData{ long logid; char logdate[11]; char lognote[15]; double charge; d 阅读全文
posted @ 2021-09-28 00:15 就是想学习 阅读(102) 评论(0) 推荐(0)
摘要: 实数取整写入文件 #include <stdio.h> #include <stdlib.h> #define MAXN 300 int main(void){ int i,j; FILE *fp, *fp1; double nums[MAXN]; if ((fp=fopen("f1.txt", " 阅读全文
posted @ 2021-09-27 17:03 就是想学习 阅读(99) 评论(0) 推荐(0)
摘要: 写字符并验证 #include <stdio.h> #include <stdlib.h> #define MAXN 300 int main(void){ FILE *fp; char ch; char string[MAXN]; gets(string); if ((fp=fopen("f3.t 阅读全文
posted @ 2021-09-27 16:32 就是想学习 阅读(71) 评论(0) 推荐(0)
摘要: 字母转换并统计行数 #include <stdio.h> #include <stdlib.h> int main(void){ char ch; int enter_count; FILE *fp; enter_count = 0; if ((fp=fopen("f12-2.txt", "r")) 阅读全文
posted @ 2021-09-27 16:11 就是想学习 阅读(80) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <string.h> #include <stdlib.h> #define SIZE 5 struct sysuser{ char username[20]; char pwssword[8]; }; void encrypt_(char * 阅读全文
posted @ 2021-09-27 15:53 就是想学习 阅读(76) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> struct sysuser{ char username[20]; char password[8]; }; void encrypt_(char *pwd); int check 阅读全文
posted @ 2021-09-27 15:10 就是想学习 阅读(105) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> int main(void){ FILE *fp1, *fp2; char ch; if ((fp1 = fopen("f12-2.txt", "r")) == NULL) { printf("File open erro 阅读全文
posted @ 2021-09-27 14:00 就是想学习 阅读(82) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 45 下一页