xsnippet logotype

xsnippet

#362514, Untitled [ Text only ]

by Guest
 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include <iostream>

using namespace std;

class Timer
{
public:
	int a;
	void funcTimer(int at, int bt, int ct)
	{
		a = at;
		b = bt;
		c = ct;
	};
	void funcTResult()
	{
		cout << "a=" << a << " b=" << b << " c=" << c << endl;
	};
private:
	int b;
protected:
	int c;
};

class Clock : public Timer
{
public:
	int x;
	void funcClock(int xt, int yt, int zt)
	{
		x = xt;
		y = yt;
		z = zt;
	};
	void funcCResult()
	{
		cout << "x=" << x << " y=" << y << " z=" << z << endl;
	};
private:
	int y;
protected:
	int z;
};

class Hand : public Clock
{
public:
	int i;
	void funcHand(int it, int jt, int kt)
	{
		i = it;
		j = jt;
		k = kt;
	};
	void funcHResult()
	{
		cout << "i=" << i << " j=" << j << " k=" << k << endl;
	};
private:
	int j;
protected:
	int k;
};

void main()
{
	int A, B, C, X, Y, Z, I, J, K;
	cout << "a=";	cin >> A;
	cout << "b=";	cin >> B;
	cout << "c=";	cin >> C;
	cout << "x=";	cin >> X;
	cout << "y=";	cin >> Y;
	cout << "z=";	cin >> Z;
	cout << "i=";	cin >> I;
	cout << "j=";	cin >> J;
	cout << "k=";	cin >> K;
	Timer TimeT; Clock TimeC; Hand TimeH;
	TimeT.funcTimer(A, B, C);
	TimeT.funcTResult();
	TimeC.funcClock(X, Y, Z);
	TimeC.funcCResult();
	TimeH.funcHand(I, J, K);
	TimeH.funcHResult();
}