04 2023 档案
摘要:1 #include<iostream> 2 using namespace std; 3 class Rectangle { 4 public: 5 int j; 6 void area(int X = 0, int Y = 0, int A = 0, int B = 0); 7 private:
阅读全文
摘要:1 #include<iostream> 2 #include<string> 3 using namespace std; 4 int main() 5 { 6 int a[5]={},b; 7 cout<<"请输入5个元素"<<endl; 8 for(b=0;b<5;b++) 9 { 10 ci
阅读全文
摘要:1 #include <iostream> 2 #include <cmath> 3 using namespace std; 4 5 class Complex { 6 private: 7 float re, im; 8 public: 9 Complex(float r, float i =
阅读全文
摘要:1 #include <iostream> 2 using namespace std; 3 class DataType 4 { 5 public: 6 DataType(int i) 7 { 8 data.i = i; 9 type = INT; 10 } 11 DataType(char c)
阅读全文
摘要: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
阅读全文

浙公网安备 33010602011771号