摘要: task4 源代码: #include<stdio.h> int main(){ char ch; int i=0; FILE *fp; fp=fopen("data4.txt","r"); if(fp==NULL){ printf("fail to open file\n"); return 1; 阅读全文
posted @ 2023-12-19 23:07 奔满足于驰 阅读(8) 评论(0) 推荐(0)
摘要: task4 源代码: #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_price; // 阅读全文
posted @ 2023-12-12 19:53 奔满足于驰 阅读(34) 评论(0) 推荐(0)
摘要: task1_1 代码: #include <stdio.h> #define N 5 void input(int x[], int n); void output(int x[], int n); void find_min_max(int x[], int n, int *pmin, int * 阅读全文
posted @ 2023-12-02 23:35 奔满足于驰 阅读(19) 评论(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)); // 阅读全文
posted @ 2023-11-19 17:35 奔满足于驰 阅读(20) 评论(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 @ 2023-10-31 12:54 奔满足于驰 阅读(33) 评论(0) 推荐(0)
摘要: 实验一 代码: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand( time 阅读全文
posted @ 2023-10-23 22:42 奔满足于驰 阅读(22) 评论(0) 推荐(0)
摘要: task1-1 源代码: #include <stdio.h> int main() { printf(" O\n"); printf("<H>\n"); printf("| |\n"); printf(" O\n"); printf("<H>\n"); printf("| |\n"); } tas 阅读全文
posted @ 2023-09-28 15:27 奔满足于驰 阅读(26) 评论(0) 推荐(0)