include iostream include fstream using namespace std class Fraction pr

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include <iostream>
#include <fstream>
using namespace std;
class Fraction
{
protected:
int x, y;
char *comment;
Fraction *next;
public:
friend class List;
Fraction();
Fraction(int, int, char *);
Fraction(const Fraction &A);
~Fraction();
double Summa(int a, int b, int c, int d);
void Print();
double Sokr();
Fraction operator+(const Fraction &B);
friend Fraction operator-(const Fraction &A, const Fraction &B);
void operator ++();
Fraction operator ++(int);
operator double();
Fraction* operator=(const Fraction &C);
friend ostream& operator<< (ostream& os, Fraction &p);
friend istream& operator>> (istream& is, Fraction &p);
friend ofstream& operator<< ( ofstream& os, Fraction& dt );
void rbw(char* os);
void writ(char* os);
void readd(char* os);
};
class Result: public Fraction
{ friend class List;
double res;
public:
Result();
void Print();
};
class Komb:public Fraction
{ friend class List;
int z;
public:
Komb(int, int, int, char*);
void Print();
};
class List {
private:
Fraction *first,*end;
public:
friend class Fraction;
friend class Result;
friend class Komb;
int size;
List();
~List();
void InsertE(Fraction*,Result*, Komb*);
void Del();
void InsertN(Fraction*,Result*, Komb*);
Fraction* Find(int& xx);
void Show();
};