摘要: 实验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 沉睡的余数 阅读(5) 评论(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 沉睡的余数 阅读(4) 评论(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 沉睡的余数 阅读(8) 评论(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 沉睡的余数 阅读(8) 评论(1) 推荐(0)
摘要: 任务1 1.实验代码 #pragma once #include <string> // 发行/出版物类:Publisher (抽象类) class Publisher { public: Publisher(const std::string &name_ = ""); // 构造函数 virtu 阅读全文
posted @ 2025-12-16 23:36 沉睡的余数 阅读(14) 评论(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 沉睡的余数 阅读(21) 评论(1) 推荐(0)
摘要: 实验1 1.源代码 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label_); const std::string& get_label() 阅读全文
posted @ 2025-11-25 23:46 沉睡的余数 阅读(22) 评论(1) 推荐(1)
摘要: 1.实验任务1 #pragma once #include <string> class T { public: T(int x = 0, int y = 0); T(const T& t); T(T&& t); ~T(); void adjust(int ratio); void display( 阅读全文
posted @ 2025-10-29 07:15 沉睡的余数 阅读(16) 评论(1) 推荐(0)
摘要: 实验任务 1 验证性实验 在C++编码环境中,输入、运行并观察以下代码,结合运行结果和注释,体验使用C++标准库进行编程的便捷性。从面 向对象编程范式的角度,体会封装与基于接口编程的意义。 1 #include <iostream> 2 #include <string> 3 #include <v 阅读全文
posted @ 2025-10-18 01:10 沉睡的余数 阅读(30) 评论(1) 推荐(0)