摘要: 实验任务1 t.h #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 radio); void display() con 阅读全文
posted @ 2024-10-23 08:55 王青松15252129616 阅读(26) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> #include <vector> #include <algorithm> using namespace std; template<typename T> void output(const T &c); void t 阅读全文
posted @ 2024-10-09 15:06 王青松15252129616 阅读(31) 评论(0) 推荐(0) 编辑
摘要: // 将图书信息写入文本文件data1.txt #include <stdio.h> #define N 80 typedef struct { char name[N]; // 书名 char author[N]; // 作者 } Book; int main() { Book x[] = { { 阅读全文
posted @ 2023-12-16 18:18 王青松15252129616 阅读(3) 评论(0) 推荐(0) 编辑
摘要: // P286例8.17 // 对教材上的程序作了微调整,把输出学生信息单独编写成一个函数模块 // 打印不及格学生信息和所有学生信息程分别调用 #include <stdio.h> #include <string.h> #define N 10 // 运行程序输入测试时,可以把这个数组改小一些输 阅读全文
posted @ 2023-12-12 16:06 王青松15252129616 阅读(1) 评论(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); int m 阅读全文
posted @ 2023-11-29 16:33 王青松15252129616 阅读(3) 评论(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)); // 输出int类型数组a中每个 阅读全文
posted @ 2023-11-14 23:28 王青松15252129616 阅读(3) 评论(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[]); void print_s 阅读全文
posted @ 2023-10-30 22:34 王青松15252129616 阅读(2) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<stdlib.h> #include<time.h> #define N 5 #define N1 347 #define N2 465 int main() { int number; int i; srand(time(0)); for(i= 阅读全文
posted @ 2023-10-16 23:24 王青松15252129616 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> int main() { printf(" 0\n"); printf("<H>\n"); printf("I I\n"); return 0; } #include<stdio.h> int main() { printf(" 0\n"); printf("<H 阅读全文
posted @ 2023-09-28 21:15 王青松15252129616 阅读(9) 评论(0) 推荐(0) 编辑