摘要: 实验任务一 #pragma once #include <vector> #include <array> #include <string> class GradeCalc { public: GradeCalc(const std::string &cname); void input(int 阅读全文
posted @ 2025-12-02 23:39 晚夕惋惜婉西 阅读(4) 评论(0) 推荐(0)
摘要: 实验任务一 #pragma once #include <iostream> #include <string> class Button { public: Button(const std::string &label_); const std::string& get_label() cons 阅读全文
posted @ 2025-11-26 00:14 晚夕惋惜婉西 阅读(5) 评论(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:29 晚夕惋惜婉西 阅读(5) 评论(1) 推荐(0)
摘要: 实验任务一 #include <iostream> #include <string> #include <vector> #include <algorithm> template<typename T> void output(const T &c); void test1(); void te 阅读全文
posted @ 2025-10-17 23:41 晚夕惋惜婉西 阅读(7) 评论(1) 推荐(0)
摘要: #include<stdio.h> #define N 2 int main(){ char *x[N]={"0123456789-0123456789", "nuist2023 - nuist2024" }; int i; FILE *fp; fp=fopen("data4.txt","w"); 阅读全文
posted @ 2023-12-21 21:26 晚夕惋惜婉西 阅读(22) 评论(0) 推荐(0)
摘要: #include <stdio.h> #define N 80 void replace(char *str, char old_char, char new_char); int main() { char text[N] = "c programming is difficult or not, 阅读全文
posted @ 2023-12-03 23:28 晚夕惋惜婉西 阅读(15) 评论(0) 推荐(0)
摘要: #include<stdio.h> #define N 80 int count(char x[]); int main() { char words[N+1]; int n; while(gets(words) != NULL) { n = count(words); printf("单词数: % 阅读全文
posted @ 2023-11-19 14:23 晚夕惋惜婉西 阅读(22) 评论(0) 推荐(0)
摘要: #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)); for(i= 阅读全文
posted @ 2023-11-05 16:23 晚夕惋惜婉西 阅读(5) 评论(0) 推荐(0)
摘要: #include<stdio.h> int func(int n,int m); int main() { int n,m; while(scanf("%d%d",&n,&m)!= EOF) printf("n=%d,m=%d,ans=%d\n",n,m,func(n,m)); return 0; 阅读全文
posted @ 2023-11-03 10:54 晚夕惋惜婉西 阅读(11) 评论(0) 推荐(0)
摘要: #include <stdio.h> int main() { char ans1, ans2; // 用于保存用户输入的答案 printf("每次课前认真预习、课后及时复习了没? (输入y或Y表示有,输入n或N表示没有) : "); ans1 = getchar(); // 从键盘输入一个字符,赋 阅读全文
posted @ 2023-10-08 23:07 晚夕惋惜婉西 阅读(36) 评论(0) 推荐(0)