摘要: task4.c 1 #include <stdio.h> 2 3 int main(){ 4 int count=0; 5 char ch; 6 FILE *fp; 7 8 fp = fopen("data4.txt", "r"); 9 if(fp == NULL) { 10 printf("fai 阅读全文
posted @ 2024-06-17 21:01 林中有杉木 阅读(38) 评论(0) 推荐(0)
摘要: task1.c 1 // P286例8.17 2 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 3 // 打印不及格学生信息和所有学生信息程分别调用 4 5 #include <stdio.h> 6 #include <string.h> 7 #define N 3 // 运 阅读全文
posted @ 2024-06-09 10:09 林中有杉木 阅读(25) 评论(0) 推荐(0)
摘要: task1_1 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[], int n); 5 void output(int x[], int n); 6 void find_min_max(int x[], int n, int *pmi 阅读全文
posted @ 2024-05-24 17:29 林中有杉木 阅读(39) 评论(0) 推荐(0)
摘要: task1_1.c 1 #include <stdio.h> 2 #define N 4 3 4 void test1() { 5 int a[N] = {1, 9, 8, 4}; 6 int i; 7 8 // 输出数组a占用的内存字节数 9 printf("sizeof(a) = %d\n", 阅读全文
posted @ 2024-05-18 13:11 林中有杉木 阅读(43) 评论(0) 推荐(0)
摘要: task1.c 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 #include <windows.h> 5 #define N 80 6 7 void print_text(int line, int col, ch 阅读全文
posted @ 2024-04-26 21:45 林中有杉木 阅读(29) 评论(0) 推荐(0)
摘要: task1.c 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 #define N 5 5 int main(){ 6 int number; 7 int i; 8 srand(time(0)); 9 for(i=0;i<N 阅读全文
posted @ 2024-04-13 20:05 林中有杉木 阅读(25) 评论(0) 推荐(0)
摘要: task1_1.c 1 #include<stdio.h> 2 int main() 3 { 4 printf(" O \n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" O \n"); 8 printf("<H>\n"); 9 printf 阅读全文
posted @ 2024-03-15 16:39 林中有杉木 阅读(42) 评论(0) 推荐(0)