摘要: 任务一: task1.cpp: #include "window.hpp" #include <iostream> void test(){ Window w("Demo"); w.add_button("add"); w.add_button("remove"); w.add_button("mo 阅读全文
posted @ 2025-11-23 10:10 yueTO 阅读(10) 评论(1) 推荐(0)
摘要: task1: T.h: 1 #pragma once 2 3 #include <string> 4 5 // 类T: 声明 6 class T { 7 // 对象属性、方法 8 public: 9 T(int x = 0, int y = 0); // 普通构造函数 10 T(const T &t 阅读全文
posted @ 2025-10-24 22:01 yueTO 阅读(13) 评论(1) 推荐(0)
摘要: task1: 代码: 1 #include <iostream> 2 #include <string> 3 #include <vector> 4 #include <algorithm> 5 6 template<typename T> 7 void output(const T &c); 8 阅读全文
posted @ 2025-10-15 10:15 yueTO 阅读(8) 评论(1) 推荐(0)
摘要: task4 1 #include<stdio.h> 2 3 void read(); 4 5 int main() 6 { 7 read(); 8 9 return 0; 10 } 11 12 void read() 13 { 14 FILE *fp; 15 int len=0,num=0,a; 1 阅读全文
posted @ 2024-12-26 11:33 yueTO 阅读(15) 评论(0) 推荐(0)
摘要: task4 1 #include <stdio.h> 2 #define N 10 3 4 typedef struct { 5 char isbn[20]; // isbn号 6 char name[80]; // 书名 7 char author[80]; // 作者 8 double sale 阅读全文
posted @ 2024-12-21 13:26 yueTO 阅读(8) 评论(0) 推荐(0)
摘要: task1.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 *pmi 阅读全文
posted @ 2024-12-05 21:57 yueTO 阅读(13) 评论(0) 推荐(0)
摘要: task1 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 // 输出数组x占用的内存字节数 10 printf("sizeof(x 阅读全文
posted @ 2024-11-08 11:51 yueTO 阅读(10) 评论(0) 推荐(0)
摘要: task1 1 #include<stdio.h> 2 char grade(int score) 3 { 4 char a; 5 switch(score/10) 6 { 7 case 10: 8 case 9:a = 'A';break; 9 case 8:a = 'B';break; 10 c 阅读全文
posted @ 2024-10-25 20:19 yueTO 阅读(29) 评论(0) 推荐(0)
摘要: task1 Q1:赋值random_no班级内学号的随机值 Q2:赋值random_no班级内奇安信班学号的随机值 Q3:随机抽取班级内同学的学号 task2 1 #include <stdio.h> 2 #include <math.h> 3 4 int main() { 5 double a, 阅读全文
posted @ 2024-10-09 21:07 yueTO 阅读(31) 评论(0) 推荐(0)
摘要: task1.1c 1 #include<stdio.h> 2 int main() 3 { 4 printf(" O\n"); 5 printf("<H>\n"); 6 printf("I I\n"); 7 printf(" O\n"); 8 printf("<H>\n"); 9 printf("I 阅读全文
posted @ 2024-09-28 13:14 yueTO 阅读(16) 评论(0) 推荐(0)