摘要: 一、 #include <stdio.h> #include <stdlib.h> int main() { char cr; FILE *fp; long count; if((fp=fopen("data4.txt","r"))==NULL) { printf("Can't open file. 阅读全文
posted @ 2022-12-27 20:46 辞·kennthy 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 1 // P286例8.17 2 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 3 // 打印不及格学生信息和所有学生信息程分别调用 4 5 #include <stdio.h> 6 #include <string.h> 7 #define N 3 // 运行程序输入测试时 阅读全文
posted @ 2022-12-27 14:31 辞·kennthy 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #define N 4 3 4 int main() { 5 int a[N] = {1, 9, 8, 4}; 6 char b[N] = {'1', '9', '8', '4'}; 7 int i; 8 9 printf("sizeof(int) = 阅读全文
posted @ 2022-11-28 23:54 辞·kennthy 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 void print_text(int line, int col, char text[]) 阅读全文
posted @ 2022-11-06 17:08 辞·kennthy 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 #define N 5 5 int main() 6 { 7 int number; 8 int i; 9 srand(time(0)); 10 for(i=0;i<N;i++ 阅读全文
posted @ 2022-10-25 22:17 辞·kennthy 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 1 #include <stdio.h> 2 int main() 3 { 4 printf(" O \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 return 0; 8 } 1 #include<stdio.h> 2 #include<stdlib.h 阅读全文
posted @ 2022-10-16 16:21 辞·kennthy 阅读(46) 评论(0) 推荐(0) 编辑