- 博客(9)
- 收藏
- 关注
原创 第八章
1: #include #include using namespace std; double q(double,double,double); void main() {double a,b,c,p,x1,x2; cout cin>>a>>b>>c; p=-b/(2*a); try {x1=p+q(a,b,c); x2=p-q(a,b,c);
2015-06-16 17:43:33
145
原创 第七章
1: #include #include using namespace std; int main() {double a,b,c,s,area; cout cin>>a>>b>>c; if (a+b cerr else if(b+c cerr else if (c+a cerr else {s=(a+b+c)/2;
2015-06-16 17:41:31
147
原创 第六章
1: #include using namespace std; class Student {public: void get_value() {cin>>num>>name>>sex;} void display( ) {cout cout cout private : int num; char name[1
2015-06-08 21:31:17
153
原创 第五章
1: #include using namespace std; class Student {public: void get_value() {cin>>num>>name>>sex;} void display( ) {cout cout cout private : int num; char name[1
2015-06-08 21:30:21
161
原创 第四章
2: #include using namespace std; class Complex {public: Complex(){real=0;imag=0;} Complex(double r,double i){real=r;imag=i;} Complex operator+(Complex &c2); Complex operator-(Com
2015-06-08 21:24:00
174
原创 第三章
4: #include using namespace std; class Student {public: Student(int n,float s):num(n),score(s){} void display(); private: int num; float score; }; void Student::displ
2015-04-20 16:19:31
120
原创 第二章
2: #include using namespace std; class Time {public: void set_time(void) {cin>>hour; cin>>minute; cin>>sec; } void show_time(void) {cout pri
2015-04-20 16:17:08
197
原创 第一章
7.#include using namespace std; int max(int x,int y,int z=0) { return x>y ? (x>z ? x:z):(y>z ? y:z); } int main() { int a,b,c; cin>>a>>b>>c; cout return 0; } 8.#includ
2015-04-20 16:11:24
181
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人