摘要:
1 #include<iostream> 2 using namespace std; 3 class BaseClass 4 { 5 public: 6 BaseClass() 7 { 8 cout<<"构造基类对象"<<endl; 9 } 10 }; 11 class DerivedClass: 阅读全文
摘要:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int N,a,b,c,i,n,sum=0; 6 cin>>N;cout<<endl; 7 8 for(i=0;i<N;i++) 9 { 10 cin>>a>>b;cout< 阅读全文
摘要:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int x; 6 cin>>x; 7 cout<<"gong xi ni kao le 90 fen!"; 8 return 0; 9 } 1 #include<iostre 阅读全文
摘要:
1 #include<iostream> 2 #include<string> 3 using namespace std; 4 class people{ 5 protected: 6 int age;string name; 7 public: 8 people(){}; 9 people(in 阅读全文
摘要:
求多边形的面积 1 #include<iostream> 2 using namespace std; 3 class CPolygon{ 4 protected: 5 int width,height; 6 public: 7 void set_values(int a,int b) 8 { 9 阅读全文
摘要:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 char a,N,Y; 6 while(1){ 7 8 cout<<"现在正在下雨吗?"<<endl; 9 cout<<"请输入N或Y:"; 10 cin>>a; 11 if 阅读全文
摘要:
1 #include<iostream> 2 using namespace std; 3 int main() 4 { 5 int x; 6 cout<<"你考试考了多少分:"<<endl; 7 cin>>x; 8 if(x<=100&&x>=90) 9 cout<<"优"<<endl; 10 e 阅读全文