摘要: 实验任务1: 源代码: contestant.hpp 1 #pragma once 2 #include <iomanip> 3 #include <iostream> 4 #include <string> 5 6 struct Contestant { 7 long id; // 学号 8 st 阅读全文
posted @ 2025-12-23 22:18 雅ya 阅读(4) 评论(1) 推荐(0)
摘要: 实验任务1: 代码: publisher.cpp 1 #include <iostream> 2 #include <string> 3 #include "publisher.hpp" 4 5 Publisher::Publisher(const std::string &name_): name 阅读全文
posted @ 2025-12-16 23:52 雅ya 阅读(19) 评论(1) 推荐(0)
摘要: 实验任务1: 代码: GradeCalc.hpp 1 #pragma once 2 3 #include <vector> 4 #include <array> 5 #include <string> 6 7 class GradeCalc { 8 public: 9 GradeCalc(const 阅读全文
posted @ 2025-12-02 23:51 雅ya 阅读(7) 评论(1) 推荐(0)
摘要: 实验任务1: 代码: button.hpp 1 #pragma once 2 3 #include <iostream> 4 #include <string> 5 6 class Button { 7 public: 8 Button(const std::string &label_); 9 c 阅读全文
posted @ 2025-11-26 01:21 雅ya 阅读(4) 评论(1) 推荐(0)
摘要: 1、实验任务1: T.h源代码: 1 #pragma once 2 3 #include <string> 4 5 class T { 6 7 public: 8 T(int x = 0, int y = 0); 9 T(const T &t); 10 T(T &&t); 11 ~T(); 12 1 阅读全文
posted @ 2025-10-28 22:56 雅ya 阅读(7) 评论(1) 推荐(0)
摘要: 1.实验任务1 源代码: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 6 template<typename T> 7 void output(const T &c); 阅读全文
posted @ 2025-10-18 01:12 雅ya 阅读(13) 评论(1) 推荐(0)
摘要: 实验任务4: 源代码: 1 #include <stdio.h> 2 #include <string.h> 3 4 int main() { 5 FILE *fp; 6 char line[100]; 7 int a = 0; 8 int s = 0; 9 int i; 10 11 fp = fo 阅读全文
posted @ 2024-12-30 02:16 雅ya 阅读(16) 评论(0) 推荐(0)
摘要: 实验任务4: 源代码: 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; 6 char name[80]; 7 char author[80]; 8 double sales_price; 9 int 阅读全文
posted @ 2024-12-22 21:27 雅ya 阅读(15) 评论(0) 推荐(0)
摘要: 实验任务1: (1)源代码: 1 #include <stdio.h> 2 #define N 5 3 4 void input(int x[],int n); 5 void output(int x[],int n); 6 void find_min_max(int x[], int n, int 阅读全文
posted @ 2024-12-08 20:02 雅ya 阅读(14) 评论(0) 推荐(0)
摘要: 实验任务1: 源代码: 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 printf("sizeof(x) = %d\n",sizeof(x 阅读全文
posted @ 2024-11-10 18:15 雅ya 阅读(22) 评论(0) 推荐(0)