摘要: 实验任务4 源代码 #include <stdlib.h> #include<stdio.h> int main() { FILE *fp; char ch; int line = 0, charcnt = 0; fp = fopen("data4.txt","r"); if(fp == NULL) 阅读全文
posted @ 2026-06-23 17:13 九天风谷 阅读(8) 评论(0) 推荐(0)
摘要: 实验任务4 task4.c 源代码 #include <stdio.h> #define N 10 typedef struct { char isbn[20]; char name[80]; char author[80]; double sales_price; int sales_count; 阅读全文
posted @ 2026-06-14 22:18 九天风谷 阅读(7) 评论(0) 推荐(0)
摘要: 1.实验任务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 *pm 阅读全文
posted @ 2026-06-02 21:04 九天风谷 阅读(8) 评论(0) 推荐(0)
摘要: 实验任务1 task1.c #include <stdio.h> #define N 4 #define M 2 void test1() { int x[N] = {1, 9, 8, 4}; int i; printf("sizeof(x) = %d\n", sizeof(x)); for (i 阅读全文
posted @ 2026-05-03 12:42 九天风谷 阅读(11) 评论(0) 推荐(0)
摘要: 1.实验任务1 task1.c #include <stdio.h> char score_to_grade(int score); int main() { int score; char grade; while (scanf("%d", &score) != EOF) { grade = sc 阅读全文
posted @ 2026-04-20 17:05 九天风谷 阅读(5) 评论(0) 推荐(0)
摘要: 1.实验任务1 源代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 int main() { int number; int i; srand(time(0)); for(i = 0;i<N;++i) { 阅读全文
posted @ 2026-04-07 21:45 九天风谷 阅读(3) 评论(0) 推荐(0)
摘要: ## 1.实验任务1 task1_1.c #include <stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" o \n"); printf("<H>\n"); printf("I I\ 阅读全文
posted @ 2026-03-24 23:19 九天风谷 阅读(10) 评论(0) 推荐(0)