摘要: task3 task3_1.cpp: #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 阅读全文
posted @ 2022-12-06 14:58 哼·哈 阅读(14) 评论(0) 推荐(0) 编辑
摘要: task4 main.cpp: #include <iostream> #include <string> using namespace std; #include <stdlib.h> #include "pets.h" MachinePets::MachinePets(string s/*=" 阅读全文
posted @ 2022-11-30 10:17 哼·哈 阅读(3) 评论(0) 推荐(0) 编辑
摘要: task5.cpp: #include <iostream> #include "vectorlnt.hpp" void test() { using namespace std; int n; cin >> n; vectorlnt x1(n); for(auto i= 0; i < n; ++i 阅读全文
posted @ 2022-11-05 23:23 哼·哈 阅读(6) 评论(0) 推荐(0) 编辑
摘要: task5: info.hpp: #include<iostream> #include<vector> #include<string> #include<iomanip> using namespace std; class info{ private: string nickname; str 阅读全文
posted @ 2022-10-26 13:07 哼·哈 阅读(17) 评论(0) 推荐(0) 编辑
摘要: task4: complex.hpp: #pragma once #include<iostream> #include<cmath> using std::cout; using std::endl; class complex{ public: complex(double r=0.0,doub 阅读全文
posted @ 2022-10-19 13:41 哼·哈 阅读(17) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <string> #include <vector> int main() { using namespace std; string s1; // 创建一个string对象 string s2{"c plus plus"}; // 创建一个 阅读全文
posted @ 2022-10-04 09:25 哼·哈 阅读(10) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/1539238856cy/ 阅读全文
posted @ 2022-09-27 21:13 哼·哈 阅读(11) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 5 // 定义结构体类型struct student,并定义STU为其别名 typedef struct student { long no; char name[20]; int score; } STU; // 函数声明 void inp 阅读全文
posted @ 2021-12-30 20:11 哼·哈 阅读(21) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 5 int binarySearch(int *x, int n, int item); // 函数声明 int main() { int a[N] = {2, 7, 19, 45, 66}; int i, index, key; print 阅读全文
posted @ 2021-12-22 21:38 哼·哈 阅读(13) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #define N 5 void output(int x[], int n); int main() { int x[N] = {9, 55, 30, 27, 22}; int i; int k; // 用于记录最大元素的下标 int t; // 用作交换两个 阅读全文
posted @ 2021-12-13 23:46 哼·哈 阅读(6) 评论(0) 推荐(0) 编辑