摘要: #include<iostream>using namespace std;enum Level1{FRESHMAN,SOPHOMORE,JUNIOR,SENIOR};enum Grade{A,B,C,D};class Student{ public: Student(unsigned number 阅读全文
posted @ 2023-04-17 13:08 不会JAVA的小袁 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<string>using namespace std;int main(){ for(int i=0;i<2;i++) { string city,state; getline(cin,city,','); getline(cin,state); 阅读全文
posted @ 2023-04-17 12:43 不会JAVA的小袁 阅读(7) 评论(0) 推荐(0) 编辑
摘要: #include<string>#include<iostream>using namespace std;inline void test(const char *title,bool value){ cout<<title<<"returns"<<(value?"true":"false")<< 阅读全文
posted @ 2023-04-17 12:37 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;int main(){ int Line1[]={1,0,0}; int Line2[]={0,1,0}; int Line3[]={0,0,1}; int *pLine[3]={line1,line2,line3}; co 阅读全文
posted @ 2023-04-16 20:57 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;void rowSum(int a[][4],int nRow){ for(int i=0;i<nRow;i++){ for(int j=1;j<4;j++) a[i][0]+=a[i][j]; }}int main(){ 阅读全文
posted @ 2023-04-16 20:44 不会JAVA的小袁 阅读(4) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;int main(){ int a[10],b[10]; for(int i=0;i<0;i++){ a[i]=i*2-1; b[10-i-1]=a[i]; } for(const auto &e:a) cout<<e<<" 阅读全文
posted @ 2023-04-16 20:32 不会JAVA的小袁 阅读(3) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>#include<cmath>using namespace std;class Point{ public: Point(int x=0,int y=0):x(x),y(y){} int getX(){return x; } int getY({retuen y 阅读全文
posted @ 2023-04-16 20:21 不会JAVA的小袁 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;class A{ public: A(int i); void print(); private: const int a; static const int b;};const intA::b=10;A::A(int i) 阅读全文
posted @ 2023-04-16 20:10 不会JAVA的小袁 阅读(5) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> using namespace std; class Dog { public: void setdata() { cin >> name >> age >> sex >> weight; } void GetName() { cout << "它的名字叫" 阅读全文
posted @ 2023-04-15 18:55 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑
摘要: #include<iostream>using namespace std;class Time{ friend ostream& operator<<(ostream& cout, Time& t); friend istream& operator>>(istream& cin, Time& t 阅读全文
posted @ 2023-04-15 18:37 不会JAVA的小袁 阅读(9) 评论(0) 推荐(0) 编辑