摘要: 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-21 09:23 dxian 阅读(38) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include<stdlib.h> 3 #include <string.h> 4 #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 5 6 typedef struct student { 7 int id; // 学 阅读全文
posted @ 2024-06-07 14:10 dxian 阅读(86) 评论(0) 推荐(0)
摘要: 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 *pmin, int * 阅读全文
posted @ 2024-05-27 12:40 dxian 阅读(29) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 4 void test1() { int a[N] = {1, 9, 8, 4}; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出int类型数组a中每个 阅读全文
posted @ 2024-05-19 21:02 dxian 阅读(43) 评论(0) 推荐(0)
摘要: 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, char text[ 阅读全文
posted @ 2024-04-28 22:00 dxian 阅读(48) 评论(0) 推荐(0)
摘要: 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <time.h> 4 5 #define N 5 6 int main() 7 { 8 int number; 9 int i; 10 11 srand( time(0)); 12 13 fo 阅读全文
posted @ 2024-04-15 00:16 dxian 阅读(31) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2024-03-16 10:51 dxian 阅读(15) 评论(0) 推荐(0)