摘要: 实验任务4 task4.c源代码 #include <stdio.h> #include <string.h> #include<ctype.h> int main(){ FILE *fp = fopen("data4.txt","r"); int line_count = 0; int char_ 阅读全文
posted @ 2025-06-09 13:45 runjizhao 阅读(16) 评论(0) 推荐(0)
摘要: 实验任务4 task4.c源代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; // isbn号 char name[80]; // 书名 char author[80]; // 作者 double sales_pri 阅读全文
posted @ 2025-06-03 20:58 runjizhao 阅读(11) 评论(0) 推荐(0)
摘要: 实验任务1 task1_1.c源代码 #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 阅读全文
posted @ 2025-05-18 21:49 runjizhao 阅读(46) 评论(0) 推荐(0)
摘要: 实验任务1 task1.c源代码 1 #include <stdio.h> 2 #define N 4 3 #define M 2 4 5 void test1() { 6 int x[N] = {1, 9, 8, 4}; 7 int i; 8 9 // 输出数组x占用的内存字节数 10 print 阅读全文
posted @ 2025-04-19 16:41 runjizhao 阅读(13) 评论(0) 推荐(0)
摘要: 实验任务1 task1.c源代码 1 #include <stdio.h> 2 3 char score_to_grade(int score); // 函数声明 4 5 int main() { 6 int score; 7 char grade; 8 9 while(scanf("%d", &s 阅读全文
posted @ 2025-04-09 22:14 runjizhao 阅读(9) 评论(0) 推荐(0)
摘要: 实验任务1 task1.c源代码: #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); // 以当前系统时间作为随机种 阅读全文
posted @ 2025-03-23 16:30 runjizhao 阅读(15) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("| |\n"); printf(" o \n"); printf("<H>\n"); printf("| |\n"); return 0; } #inc 阅读全文
posted @ 2025-03-09 17:26 runjizhao 阅读(15) 评论(0) 推荐(0)