摘要: 任务4 实验代码 #include<stdio.h> #include<stdlib.h> int main(){ int line=0,len=0; char ch; FILE *fp; fp=fopen("data4.txt","r"); if(!fp){ printf("fail to ope 阅读全文
posted @ 2026-06-23 22:50 沉睡的余数 阅读(4) 评论(0) 推荐(0)
摘要: 实验4 实验代码 #define _CRT_SECURE_NO_WARNINGS #include <stdio.h> #define N 10 #include<stdlib.h> typedef struct { char isbn[20]; char name[80]; char author 阅读全文
posted @ 2026-06-15 22:55 沉睡的余数 阅读(5) 评论(0) 推荐(0)
摘要: 实验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 *pma 阅读全文
posted @ 2026-06-01 23:17 沉睡的余数 阅读(17) 评论(0) 推荐(0)
摘要: 实验任务 实验1 #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 = 0; 阅读全文
posted @ 2026-05-05 21:15 沉睡的余数 阅读(6) 评论(0) 推荐(0)
摘要: 实验1 #include <stdio.h> char score_to_grade(int score); // 函数声明 int main() { int score; char grade; while(scanf("%d", &score) != EOF) { grade = score_t 阅读全文
posted @ 2026-04-21 23:42 沉睡的余数 阅读(6) 评论(0) 推荐(0)
摘要: 实验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; 阅读全文
posted @ 2026-04-07 23:55 沉睡的余数 阅读(7) 评论(0) 推荐(0)
摘要: 实验1 实验任务1 #include<stdio.h> int main() { printf(" o \n"); printf("<H>\n"); printf("I I\n"); printf(" o \n"); printf("<H>\n"); printf("I I\v"); return 阅读全文
posted @ 2026-03-24 23:56 沉睡的余数 阅读(11) 评论(0) 推荐(0)
摘要: 任务1 1.实验代码 #pragma once #include <iomanip> #include <iostream> #include <string> struct Contestant { long id; // 学号 std::string name; // 姓名 std::strin 阅读全文
posted @ 2025-12-24 00:08 沉睡的余数 阅读(9) 评论(1) 推荐(0)
摘要: 任务1 1.实验代码 #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = ""); // 构造函数 virtu 阅读全文
posted @ 2025-12-16 23:36 沉睡的余数 阅读(17) 评论(1) 推荐(0)
摘要: 实验1 1.源代码 #pragma once #include <vector> #include <array> #include <string> class GradeCalc { public: GradeCalc(const std::string &cname); void input( 阅读全文
posted @ 2025-12-02 22:51 沉睡的余数 阅读(22) 评论(1) 推荐(0)