Dmitry Telenkov 1 年之前
父节点
当前提交
362ba408fb
共有 16 个文件被更改,包括 646 次插入202 次删除
  1. 25 8
      courses/python_for_begginers/dict.py
  2. 168 0
      courses/python_for_begginers/set.py
  3. 11 0
      cpp.code-workspace
  4. 0 22
      cpp/.vscode/c_cpp_properties.json
  5. 0 53
      cpp/.vscode/launch.json
  6. 26 26
      cpp/.vscode/tasks.json
  7. 二进制
      cpp/inheritance
  8. 161 0
      cpp/inheritance.cpp
  9. 二进制
      cpp/misc
  10. 67 0
      cpp/misc.cpp
  11. 二进制
      cpp/stack
  12. 79 0
      cpp/stack.cpp
  13. 二进制
      cpp/test
  14. 15 93
      cpp/test.cpp
  15. 二进制
      cpp/test.exe
  16. 94 0
      test.cpp

+ 25 - 8
courses/python_for_begginers/dict.py

@@ -333,14 +333,31 @@
 
 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-from random import randint
+# from random import randint
+
+# n = 5
+# m = 5
+
+# a = [[randint(1, 6) for j in range(m)] for i in range(n)]
+# for i in a:
+# 	print(i)
 
-n = 5
-m = 5
+# b = [a[i][j] for j in range(n) for i in range(m) if i == j]
+# print('Main diag: ', b)
 
-a = [[randint(1, 6) for j in range(m)] for i in range(n)]
-for i in a:
-	print(i)
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# colors = ['White', 'Blue', 'Yellow', 'Purple', 'Black', 'Green']
+# sizes = ['S', 'M', 'L', 'XL', 'XLL']
+
+# a = [(j, i) for j in colors for i in sizes]
+# print(a)
+
+
+vector = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 11, 12], [13, 14, 15], [16, 17, 18]]
+
+a = [i for l in vector for i in l]
+print(a)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-b = [a[i][j] for j in range(n) for i in range(m) if i == j]
-print('Main diag: ', b)

+ 168 - 0
courses/python_for_begginers/set.py

@@ -0,0 +1,168 @@
+# d = set()
+# print(type(d))
+
+
+# my_list = [56, 59, 53, 75, 62, 61, 75, 65, 59, 62, 64, 53,
+#            54, 62, 69, 53, 55, 62, 54, 66, 55, 57, 58, 75,
+#            72, 55, 51, 56, 71, 66, 57, 56, 59, 73, 68, 57,
+#            50, 54, 62, 68, 59, 64, 59, 59, 71, 68, 57, 54, 53, 72]
+
+# my_set = set(my_list)
+# print(sum(my_set)/len(my_set))
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# my_set = set(input())
+# if len(my_set)%2 == 0:
+# 	print("CHAT WITH HER!")
+# else:
+# 	print("IGNORE HIM!")
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# my_set = set(input().split())
+# print(4 - len(my_set))
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# my_set = set(input().lower())
+# if len(my_set) == 26:
+# 	print("YES")
+# else:
+# 	print("NO")
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# year = int(input())
+# while year <= 9999:
+# 	year += 1
+# 	if (len(set(str(year))) == 4):
+# 		print(year)
+# 		break
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# s = input()
+# my_set = {i for i in s if i.isalpha()}
+# print(len(my_set))
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# words = ['mention', 'soup', 'pneumonia', 'tradition', 'concert', 'tease', 'generation',
+#          'winter', 'national', 'jacket', 'winter', 'wrestle', 'proposal', 'error', 
+#          'pneumonia', 'concert', 'value', 'value', 'disclose', 'glasses', 'tank',
+#          'national', 'soup', 'feel', 'few', 'concert', 'wrestle', 'proposal', 'soup',
+#          'sail', 'brown', 'service', 'proposal', 'winter', 'jacket', 'mention', 'tradition',
+#          'value', 'feel', 'bear', 'few', 'value', 'winter', 'proposal', 'government', 
+#          'control', 'value', 'few', 'generation', 'service', 'national',
+#          'tradition', 'government', 'mention', 'proposal']
+
+# my_set = set(words)
+# cnt = 0
+# for i in my_set:
+# 	if len(i) > 6:
+# 		cnt += 1
+# print(cnt)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# n = int(input())
+# for i in range(n):
+# 	my_set = set(map(int, input().split()))
+# 	print(len(my_set))
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# my_set = {'government', 'control', 'winter', 'few', 'generation',
+#           'service', 'national', 'tradition', 'government'}
+
+# my_set.update({'concert', 'brown', 'jacket', 'value'})
+# print(my_set)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# my_set = {
+#     'mention', 'soup', 'pneumonia', 'tradition', 'concert', 'tease', 'generation',
+#     'winter', 'national', 'jacket', 'winter', 'wrestle', 'proposal', 'error',
+#     'pneumonia', 'concert', 'value', 'value', 'disclose', 'glasses', 'tank',
+#     'national', 'soup', 'feel', 'few', 'concert', 'wrestle', 'proposal', 'soup',
+#     'sail', 'brown', 'service', 'proposal', 'winter', 'jacket', 'mention',
+#     'tradition', 'value', 'feel', 'bear', 'few', 'value', 'winter', 'proposal',
+#     'government', 'control', 'value', 'few', 'generation', 'service', 'national',
+#     'tradition', 'government', 'mention', 'proposal'
+# }
+
+# my_set.remove('government')
+# my_set.remove('national')
+# my_set.remove('tease')
+# my_set.discard('tease')
+# print(my_set)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# n = int(input())
+# my_list = []
+# my_set = set()
+# for i in range(n):
+# 	my_list.append(set(map(int, input().split())))
+
+# for i in my_list:
+# 	my_set.update(i)
+
+# print(len(my_set))
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# my_list = input().lower().split(',')
+# my_set = set()
+
+# for i in my_list:
+# 	if i not in my_set:
+# 		my_set.add(i)
+# 		print('НЕТ')
+# 	else:
+# 		print('ДА')
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# s1 = set(map(int, input().split()))
+# s2 = set(map(int, input().split()))
+# s3 = s1 & s2
+# l = list(s3)
+# l.sort()
+# print(*l)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# s1 = set(map(int, input().split()))
+# s2 = set(map(int, input().split()))
+# s3 = s1 - s2
+# l = list(s3)
+# l.sort()
+# print(*l)
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# my_list = list(input())
+# l = []
+# for i in my_list:
+# 	if i.isdigit() and my_list.count(i) > 1 and i not in l:
+# 		l.append(i)
+
+# if len(l) == 0:
+# 	print('NO')
+# else:
+# 	print(*sorted(l))
+
+#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	
+
+# l1 = list(input())
+# l2 = []
+# for i in l1:
+# 	if i not in l2:
+# 		l2.append(i)
+# print(''.join(l2))
+
+
+
+

+ 11 - 0
cpp.code-workspace

@@ -0,0 +1,11 @@
+{
+	"folders": [
+		{
+			"path": "cpp"
+		},
+		{
+			"path": "courses/python_for_begginers"
+		}
+	],
+	"settings": {}
+}

+ 0 - 22
cpp/.vscode/c_cpp_properties.json

@@ -1,22 +0,0 @@
-{
-    "configurations": [
-        {
-            "name": "Win32",
-            "includePath": [
-                "${workspaceFolder}/**", 
-                "C:\\Users\\user\\scoop\\apps\\gcc\\current\\include\\**"
-            ],
-            "defines": [
-                "_DEBUG",
-                "UNICODE",
-                "_UNICODE"
-            ],
-            "windowsSdkVersion": "8.1",
-            "compilerPath": "C:\\Users\\user\\scoop\\apps\\gcc\\current\\bin\\g++.exe",
-            "cStandard": "c11",
-            "cppStandard": "c++17",
-            "intelliSenseMode": "gcc-x86"
-        }
-    ],
-    "version": 4
-}

+ 0 - 53
cpp/.vscode/launch.json

@@ -1,53 +0,0 @@
-{
-    "version": "0.2.0",
-    "configurations": [
-        {
-            "name": "g++.exe build and debug active file",
-            "type": "cppdbg",
-            "request": "launch",
-            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
-            "args": [],
-            "stopAtEntry": false,
-            "cwd": "${workspaceFolder}",
-            "environment": [],
-            "externalConsole": false,
-            "MIMode": "gdb",
-            "miDebuggerPath": "C:\\Users\\user\\scoop\\apps\\gcc\\current\\bin\\gdb.exe",
-            "setupCommands": [
-                {
-                    "description": "Enable pretty-printing for gdb",
-                    "text": "-enable-pretty-printing",
-                    "ignoreFailures": true
-                }
-            ],
-            "preLaunchTask": "g++.exe build active file",
-            "internalConsoleOptions": "neverOpen"
-        },
-        {
-            "name": "C/C++: g++.exe build and debug active file",
-            "type": "cppdbg",
-            "request": "launch",
-            "program": "${fileDirname}\\${fileBasenameNoExtension}.exe",
-            "args": [],
-            "stopAtEntry": false,
-            "cwd": "${fileDirname}",
-            "environment": [],
-            "externalConsole": false,
-            "MIMode": "gdb",
-            "miDebuggerPath": "gdb.exe",
-            "setupCommands": [
-                {
-                    "description": "Enable pretty-printing for gdb",
-                    "text": "-enable-pretty-printing",
-                    "ignoreFailures": true
-                },
-                {
-                    "description": "Set Disassembly Flavor to Intel",
-                    "text": "-gdb-set disassembly-flavor intel",
-                    "ignoreFailures": true
-                }
-            ],
-            "preLaunchTask": "C/C++: g++.exe build active file"
-        }
-    ]
-}

+ 26 - 26
cpp/.vscode/tasks.json

@@ -1,28 +1,28 @@
 {
-	"version": "2.0.0",
-	"tasks": [
-		{
-			"type": "cppbuild",
-			"label": "C/C++: g++.exe build active file",
-			"command": "C:\\Users\\user\\scoop\\apps\\gcc\\current\\bin\\g++.exe",
-			"args": [
-				"-fdiagnostics-color=always",
-				"-g",
-				"${file}",
-				"-o",
-				"${fileDirname}\\${fileBasenameNoExtension}.exe"
-			],
-			"options": {
-				"cwd": "${fileDirname}"
-			},
-			"problemMatcher": [
-				"$gcc"
-			],
-			"group": {
-				"kind": "build",
-				"isDefault": true
-			},
-			"detail": "compiler: C:\\Users\\user\\scoop\\apps\\gcc\\current\\bin\\g++.exe"
-		}		
-	]
+    "tasks": [
+        {
+            "type": "cppbuild",
+            "label": "C/C++: g++ build active file",
+            "command": "/usr/bin/g++",
+            "args": [
+                "-fdiagnostics-color=always",
+                "-g",
+                "${file}",
+                "-o",
+                "${fileDirname}/${fileBasenameNoExtension}"
+            ],
+            "options": {
+                "cwd": "${fileDirname}"
+            },
+            "problemMatcher": [
+                "$gcc"
+            ],
+            "group": {
+                "kind": "build",
+                "isDefault": true
+            },
+            "detail": "Task generated by Debugger."
+        }
+    ],
+    "version": "2.0.0"
 }

二进制
cpp/inheritance


+ 161 - 0
cpp/inheritance.cpp

@@ -0,0 +1,161 @@
+#include <iostream>
+#include <stdio.h>
+
+using namespace std;
+
+class Human
+{
+protected:
+	string name;
+	int age;
+
+public:
+	Human(string n, int a) : name(n), age(a)
+	{
+		cout << "ctor Human" << endl;
+	}
+	string getName() const {
+		return name;
+	}
+	int gatAge() const {
+		return age;
+	}
+};
+
+
+class Employee : public Human
+{
+	friend void applyTax(Employee &employee);
+private:
+	double wage;
+
+public:
+	Employee(string n, int a, double w) : wage(w), Human(n, a)
+	{
+		cout << "ctor Employee" << endl;
+	}
+	double getWage() const
+	{
+		return wage;
+	}
+	void print() const
+	{
+		cout << name << " " << age << " " << wage << endl; 
+	}
+};
+
+
+// Дружественная функция для доступа к приватным членам
+void applyTax(Employee &employee)
+{
+	employee.wage *= 0.87;
+}
+
+
+// Приватный тип наследования. Можно записать как: class pEmployee : private Human
+class pEmployee : private Human
+{
+private:
+	double wage;
+
+public:
+	pEmployee(string n, int a, double w) : wage(w), Human(n, a)
+	{
+		cout << "ctor Employee" << endl;
+	}
+};
+
+// --------------------------------------------------------------------------------- //
+
+class Shape 
+{
+public:
+	virtual void show() = 0;
+};
+
+class Circle : public Shape 
+{
+public:
+	void show() {
+		cout << "Circle" << endl;
+	}
+};
+
+class Triangle : Shape {
+public:
+	void show() {
+		cout << "Triangle" << endl;
+	}
+ };
+
+
+// --------------------------------------------------------------------------------- //
+
+class D {
+public:
+	D() {cout << "D";}
+	virtual ~D() {cout << "~D";}
+};
+
+class A : public D {
+public:
+	A() {cout << "A";}
+	~A() {cout << "~A";}		
+};
+
+class C : public D {
+public:
+	C() {cout << "C";}
+	virtual ~C() {cout << "~C";}
+};
+
+class B : public A,C {
+public:
+	B() {cout << "B";}
+	~B() {cout << "~B";}		
+};
+
+// --------------------------------------------------------------------------------- //
+
+enum sex_t {male, female};
+
+class Person {
+private:
+	string name;
+	int age;
+	sex_t sex;
+	float weight;
+
+public:
+	Person(string n, int a, sex_t s, float w) : name(n), age(a), sex(s), weight(w) {}
+	
+	void setName(string n) {
+		name = n;
+	}
+};
+
+class Student : public Person {
+
+
+};
+
+
+
+int main()
+{
+	Employee worker("Ivan", 20, 100000);
+	applyTax(worker);
+	worker.print();
+
+	// pEmployee worker2("Sergey", 20, 120000);
+	// worker2.print();
+
+	Shape* shape1;
+	shape1 = new Circle();
+	shape1->show();
+
+	A* b = new B();
+	delete b;
+	
+	return 0;
+}

二进制
cpp/misc


+ 67 - 0
cpp/misc.cpp

@@ -0,0 +1,67 @@
+#include <iostream>
+#include <stdio.h>
+
+using namespace std;
+
+class Date 
+{
+public:
+	Date() : day(1), month(1), year(2000) {counter++;}
+	Date(int d, int m, int y) : day(d), month(m), year(y) {counter++;}
+	~Date() {counter--;}
+
+private:
+	int day;
+	int month;
+	int year;
+	static int counter;	// Статические переменные инициализируются вне класса
+
+public:
+	static int getCounter() {
+		return counter;
+	}
+
+public:
+	void print() {	// Константный метод не изменяет состояние объекта
+		cout << day << "." << month << "." << year << endl;
+	}
+	int getDay() const {
+		return day;
+	}
+	Date& setDay(int day) {
+		this->day = day;
+		return *this;
+	}
+	Date& setMonth(int month) {
+		this->month = month;
+		return *this;
+	}
+
+	void setDate(int d, int m, int y); // boid setDate(Date* const this, int d, int m, int y)
+};
+
+// Статические переменные инициализируются вне класса
+int Date::counter = 0;
+
+void Date::setDate(int d, int m, int y)
+{
+	day = d;
+	month = m;
+	year = y;
+}
+
+
+
+int main()
+{
+	//const Date date(17, 9, 2023);	// Для const объектов можно вызывать только const-методы
+	Date date;
+	Date date_2;
+	date.setDate(18, 9, 2023);	// setDate(&date, 18, 9, 2023)
+
+	date.print();
+	date.setDay(3).setMonth(9);
+	date.print();
+
+	cout << "Objects number: " << Date::getCounter() << endl;
+}

二进制
cpp/stack


+ 79 - 0
cpp/stack.cpp

@@ -0,0 +1,79 @@
+#include <iostream>
+#include <stdio.h>
+
+using namespace std;
+
+
+// Создайте метод reset, который очищает стек от элементов.
+// Создайте метод push, который добавляет в стек новый элемент.
+// Создайте метод pop, который удаляет последний элемент.
+// Создайте метод print, который выводит в консоль все элементы стека в формате: ( 0 1 2 )
+
+#define STACK_SIZE	10
+
+
+class Stack
+{
+public:
+	Stack() : top(-1) {}
+	~Stack() {}
+
+private:
+	int top;
+	int data[STACK_SIZE];
+
+public:
+	void reset(void) {
+		top = -1;
+	}
+
+	void push(int val) {
+		if (top != STACK_SIZE - 1) 
+			data[++top] = val;
+	}
+
+	void pop(void) {
+		if (top != -1)
+			top--;
+	}
+
+	void print(void) {
+		if (top == -1) {
+			cout << "Stack is empty" << endl;
+			return;
+		}
+		cout << "( ";
+		for (int i = 0; i <= top; i++)
+			cout << data[i] << " ";
+		cout << ")" << endl;
+
+	}
+};
+
+
+int main()
+{
+	Stack stack;
+
+	stack.push(21);
+	stack.push(22);
+	stack.push(23);
+	stack.push(24);
+
+	stack.print();
+
+	stack.pop();
+	stack.print();
+	stack.pop();
+	stack.print();
+
+	stack.reset();
+	stack.print();
+
+	stack.push(1);
+	stack.push(2);
+	stack.push(3);
+	stack.print();
+
+	return 0;
+}

二进制
cpp/test


+ 15 - 93
cpp/test.cpp

@@ -1,94 +1,16 @@
-#include <iostream>
-#include <stdio.h>
-#include <math.h>
-
-using namespace std;
-
-class Date
-{
-public:
-    Date() : day(1), month(1), year(2000) {}
-    Date(int d, int m, int y) : day(d), month(m), year(y) {}
-    ~Date() {}
-private:
-    int day;
-    int month;
-    int year;
-
-public:
-    int getDay() {
-        return day;
-    }
-    void print()
-    {
-        cout << day << "." << month << "." << year << endl;
-    }
-
-};
-
-//
-class Power
-{
-public:
-    Power() {}
-    Power(double val_one, double val_two) : a(val_one), b(val_two) {}
-
-private:
-    double a;
-    double b;
-
-public:
-    void set(double val_one, double val_two)
-    {
-        a = val_one;
-        b = val_two;
-    }
-
-    double calculate()
-    {
-        return pow(a, b);
-    }
-};
-
-
-//
-class RGB 
-{
-public:
-    RGB() : red(0), green(0), blue(0) {}
-    RGB(unsigned char r, unsigned char g, unsigned char b) : red(r), green(g), blue(b) {}
-
-private:
-    unsigned char red;
-    unsigned char green;
-    unsigned char blue;
-
-public:
-    void print() {
-        cout << "(" << (int)red << "," << (int)green << "," << (int)blue << ")" << endl;
-    }
-    void invert() {
-        red = 255 - red;
-        green = 255 - green;
-        blue = 255 - blue;
-    }
-};
-
-
-int main() {
-    // Date today(6, 9, 2023);
-    // today.print();   
-
-    // Date birthday;
-    // birthday.print();
-
-    // Power p(2, 2);
-    // cout << p.calculate() << endl;
-
-    RGB rgb(12, 54, 231);
-    rgb.print();
-    rgb.invert();
-    rgb.print();
-
-    return 0;
+#include <iostream>
+#include <vector>
+#include <string>
+
+using namespace std;
+
+int main()
+{
+	vector<string> msg {"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};
+	
+	for (const string& word : msg)
+	{
+		cout << word << " ";
+	}
+	cout << endl;
 }

二进制
cpp/test.exe


+ 94 - 0
test.cpp

@@ -0,0 +1,94 @@
+#include <iostream>
+#include <stdio.h>
+#include <math.h>
+
+using namespace std;
+
+class Date
+{
+public:
+    Date() : day(1), month(1), year(2000) {}
+    Date(int d, int m, int y) : day(d), month(m), year(y) {}
+    ~Date() {}
+private:
+    int day;
+    int month;
+    int year;
+
+public:
+    int getDay() {
+        return day;
+    }
+    void print()
+    {
+        cout << day << "." << month << "." << year << endl;
+    }
+
+};
+
+//
+class Power
+{
+public:
+    Power() {}
+    Power(double val_one, double val_two) : a(val_one), b(val_two) {}
+
+private:
+    double a;
+    double b;
+
+public:
+    void set(double val_one, double val_two)
+    {
+        a = val_one;
+        b = val_two;
+    }
+
+    double calculate()
+    {
+        return pow(a, b);
+    }
+};
+
+
+//
+class RGB 
+{
+public:
+    RGB() : red(0), green(0), blue(0) {}
+    RGB(unsigned char r, unsigned char g, unsigned char b) : red(r), green(g), blue(b) {}
+
+private:
+    unsigned char red;
+    unsigned char green;
+    unsigned char blue;
+
+public:
+    void print() {
+        cout << "(" << (int)red << "," << (int)green << "," << (int)blue << ")" << endl;
+    }
+    void invert() {
+        red = 255 - red;
+        green = 255 - green;
+        blue = 255 - blue;
+    }
+};
+
+
+int main() {
+    // Date today(6, 9, 2023);
+    // today.print();   
+
+    // Date birthday;
+    // birthday.print();
+
+    // Power p(2, 2);
+    // cout << p.calculate() << endl;
+
+    RGB rgb(12, 54, 231);
+    rgb.print();
+    rgb.invert();
+    rgb.print();
+
+    return 0;
+}