摘要: task4 #include<stdio.h> int main(){ FILE *fp; char ch; int count=0; fp=fopen("d:\\data4.txt","r"); if(fp==NULL){ printf("fail to open file\n"); return 阅读全文
posted @ 2024-06-24 13:06 但晨宁 阅读(22) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 char 阅读全文
posted @ 2024-06-10 11:09 但晨宁 阅读(28) 评论(0) 推荐(0)
摘要: task1.1 #include <stdio.h> #include<stdlib.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, i 阅读全文
posted @ 2024-05-27 13:06 但晨宁 阅读(20) 评论(0) 推荐(0)
摘要: task1.1 #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 阅读全文
posted @ 2024-05-20 13:19 但晨宁 阅读(19) 评论(0) 推荐(0)
摘要: task1 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); // 函 阅读全文
posted @ 2024-04-29 13:19 但晨宁 阅读(9) 评论(0) 推荐(0)
摘要: task1 1 #include<stdio.h> 2 #include<stdlib.h> 3 #include<time.h> 4 5 #define N 5 6 7 int main() 8 { 9 int number; 10 int i; 11 12 srand( time(0) );// 阅读全文
posted @ 2024-04-15 09:48 但晨宁 阅读(37) 评论(0) 推荐(0)
摘要: ![](https://img2024.cnblogs.com/blog/3409815/202403/3409815-20240317153040357-1921754778.png) ![](https://img2024.cnblogs.com/blog/3409815/202403/3409815-20240317153127503-1333800532.png) ![](https:// 阅读全文
posted @ 2024-03-17 15:40 但晨宁 阅读(8) 评论(0) 推荐(0)