摘要: #pragma once #include <vector> #include <array> #include <string> class GradeCalc { public: GradeCalc(const std::string &cname); void input(int n); // 阅读全文
posted @ 2025-12-02 20:51 wifi战斗机 阅读(3) 评论(0) 推荐(0)
摘要: 实验一 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label_); const std::string& get_label() const; 阅读全文
posted @ 2025-11-26 00:09 wifi战斗机 阅读(2) 评论(1) 推荐(0)
摘要: 实验任务一 #pragma once #include <string> // 类T: 声明 class T { // 对象属性、方法 public: T(int x = 0, int y = 0); // 普通构造函数 T(const T &t); // 复制构造函数 T(T &&t); // 移 阅读全文
posted @ 2025-10-28 23:21 wifi战斗机 阅读(5) 评论(1) 推荐(0)
摘要: task1 task2 task3 task4 #include<iostream> #include<string> #include<algorithm> bool is_palindrome(const std::string& s); bool is_palindrome_ignore_ca 阅读全文
posted @ 2025-10-18 01:25 wifi战斗机 阅读(11) 评论(1) 推荐(0)
摘要: 实验4源代码 #include<stdio.h> int main() { FILE* fp; fp = fopen("d:\\data4.txt", "r"); if (fp == NULL) { printf("fail to open file.\n"); return 1; } char c 阅读全文
posted @ 2023-12-21 14:46 wifi战斗机 阅读(4) 评论(0) 推荐(0)
摘要: 实验一源代码 #include <stdio.h> #include <string.h> #define N 3 // 运行程序输入测试时,可以把这个数组改小一些输入测试 typedef struct student { int id; // 学号 char name[20]; // 姓名 cha 阅读全文
posted @ 2023-12-17 23:13 wifi战斗机 阅读(13) 评论(0) 推荐(0)
摘要: 实验一源代码 #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* pmax) 阅读全文
posted @ 2023-12-03 19:31 wifi战斗机 阅读(16) 评论(0) 推荐(0)
摘要: 实验一源代码 #include <stdio.h> #define N 4 void test1() { int a[N] = { 1, 9, 8, 4 }; int i; // 输出数组a占用的内存字节数 printf("sizeof(a) = %d\n", sizeof(a)); // 输出in 阅读全文
posted @ 2023-11-19 23:23 wifi战斗机 阅读(14) 评论(0) 推荐(0)
摘要: 实验一源代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #include <windows.h> #define N 80 void print_text(int line, int col, char text[]); voi 阅读全文
posted @ 2023-11-05 22:28 wifi战斗机 阅读(15) 评论(0) 推荐(0)
摘要: 实验1源代码 #include <stdio.h> #include <stdlib.h> #include <time.h> #define N 5 #define N1 374 #define N2 465 int main() { int number; int i; srand(time(0 阅读全文
posted @ 2023-10-22 23:36 wifi战斗机 阅读(15) 评论(0) 推荐(0)