摘要: 实验任务3 #include <iostream> #include <fstream> #include <array> #define N 5 int main() { using namespace std; array<int, N> x {97, 98, 99, 100, 101}; of 阅读全文
posted @ 2022-12-06 21:10 旅、程 阅读(27) 评论(0) 推荐(0)
摘要: 实验任务4 #include <iostream> #include "pets.hpp" void play(MachinePets &obj) { std::cout << obj.get_nickname() << " says " << obj.talk() << std::endl; } 阅读全文
posted @ 2022-11-29 23:45 旅、程 阅读(22) 评论(0) 推荐(0)
摘要: 任务五 #include <iostream> #include "vectorInt.hpp" void test(){ using namespace std; int n; cin>>n; vectorInt x1(n); for(auto i=0;i<n;i++){ x1.at(i)=i*i 阅读全文
posted @ 2022-11-08 21:38 旅、程 阅读(16) 评论(0) 推荐(0)
摘要: #include <iostream> #include "Info.hpp" #include <vector> #include <string> #include <iomanip> int main() { using namespace std; const int capacity=10 阅读全文
posted @ 2022-10-25 20:30 旅、程 阅读(18) 评论(0) 推荐(0)
摘要: 实验四 .cpp #include "Complex.hpp" #include <iostream> void test() { using namespace std; Complex c1(7, -8); const Complex c2(7.8); Complex c3(c1); cout 阅读全文
posted @ 2022-10-18 14:18 旅、程 阅读(38) 评论(0) 推荐(0)
摘要: 实验五#include <iostream> #include <iomanip> class Rectangle { public: Rectangle(); ~Rectangle(); Rectangle(double l,double w); Rectangle( const Rectangl 阅读全文
posted @ 2022-09-29 22:15 旅、程 阅读(91) 评论(0) 推荐(0)