随笔分类 -  课程代码

摘要:1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 6 class Pet 7 { 8 private: 9 string name; 10 int age; 11 string color; 12 public: 阅读全文
posted @ 2020-04-29 00:14 Conan-jine 阅读(681) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 class Pet 6 { 7 public: 8 virtual void Speak(){cout<<"How does a pet speak?"<<endl;} 9 }; 10 11 cla 阅读全文
posted @ 2020-04-28 23:30 Conan-jine 阅读(308) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstring> 3 4 using namespace std; 5 6 class Person 7 { 8 private: 9 char Name[10]; 10 char Sex; 11 int Age; 12 publi 阅读全文
posted @ 2020-04-21 21:38 Conan-jine 阅读(718) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstring> 3 4 using namespace std; 5 6 class Point 7 { 8 private: 9 int x,y; 10 public: 11 Point(int,int); 12 void Se 阅读全文
posted @ 2020-04-21 20:24 Conan-jine 阅读(435) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstring> 3 4 using namespace std; 5 6 class Person 7 { 8 private: 9 char Name[10]; 10 int Age; 11 public: 12 Person( 阅读全文
posted @ 2020-04-21 18:14 Conan-jine 阅读(475) 评论(0) 推荐(1)
摘要:1 #include <iostream> 2 #include <cstring> 3 4 using namespace std; 5 6 class Person 7 { 8 protected: 9 char Name[10]; 10 char Sex; 11 int Age; 12 pub 阅读全文
posted @ 2020-04-21 15:42 Conan-jine 阅读(537) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstring> 3 4 using namespace std; 5 6 class Person 7 { 8 private: 9 char Name[20]; 10 char Sex; 11 int Age; 12 publi 阅读全文
posted @ 2020-04-20 16:58 Conan-jine 阅读(385) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 void add(); 6 void sub(); 7 void mul(); 8 void div(); 9 10 int main() 11 { 12 int choice=0; 13 cout 阅读全文
posted @ 2020-03-29 16:09 Conan-jine 阅读(1054) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstdio> 3 4 using namespace std; 5 6 class MyTime 7 { 8 private: 9 int hour; 10 int minute; 11 int second; 12 public 阅读全文
posted @ 2020-03-29 14:04 Conan-jine 阅读(535) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 const double PI=3.14; 5 6 class Ellipse 7 { 8 private: 9 int x,y; 10 double a,b; 11 double area; 12 p 阅读全文
posted @ 2020-03-29 12:29 Conan-jine 阅读(415) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 6 class Dog 7 { 8 private: 9 string name; 10 int age; 11 char sex; 12 double weig 阅读全文
posted @ 2020-03-29 00:01 Conan-jine 阅读(460) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 6 class Person 7 { 8 private: 9 string name; 10 int age; 11 char sex; 12 public: 阅读全文
posted @ 2020-03-28 23:34 Conan-jine 阅读(525) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 class Date 6 { 7 private: 8 int year; 9 int month; 10 int day; 11 public: 12 Date(){year=1900;month 阅读全文
posted @ 2020-03-28 18:04 Conan-jine 阅读(323) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <string> 3 4 using namespace std; 5 6 class Dog 7 { 8 private: 9 string name; 10 int age; 11 char sex; 12 double weig 阅读全文
posted @ 2020-03-28 17:00 Conan-jine 阅读(354) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 class Trapezium 6 { 7 private: 8 int x1,y1,x2,y2,x3,y3,x4,y4; 9 public: 10 void initial(){x1=0,x2=0 阅读全文
posted @ 2020-03-28 16:59 Conan-jine 阅读(372) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 class Trapezium 6 { 7 private: 8 int x1,y1,x2,y2,x3,y3,x4,y4; 9 public: 10 void initial(){x1=0,x2=0 阅读全文
posted @ 2020-03-28 16:58 Conan-jine 阅读(230) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstdio> 3 4 using namespace std; 5 6 class MyTime 7 { 8 private: 9 int hour; 10 int minute; 11 int second; 12 public 阅读全文
posted @ 2020-03-28 16:56 Conan-jine 阅读(245) 评论(0) 推荐(0)
摘要:1 #include <iostream> 2 3 using namespace std; 4 5 class Weekday 6 { 7 private: 8 int num; 9 public: 10 void SetDay(){cin>>num;return;} 11 void IncDay 阅读全文
posted @ 2020-03-28 16:51 Conan-jine 阅读(241) 评论(0) 推荐(0)