This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
#pragma warning(disable:4996) | |
int main() | |
{ | |
setlocale(0, ""); | |
char word[100]; | |
char theme[100]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
struct Point | |
{ | |
double x, y; | |
}; | |
struct Rectangle | |
{ | |
Point bottomLeft; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <Windows.h> | |
using namespace std; | |
//Задание 1 | |
/*int main() | |
{ | |
setlocale(0, ""); | |
char str[256], ch; | |
int count = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
// Задание 1 | |
/*int main() | |
{ | |
setlocale(0, ""); | |
int a = 10; | |
double b = 20.0; | |
string c = "30"; | |
char d = 'x'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
//Домашнє завдання 2 | |
// Задание 1 | |
/*int main() | |
{ | |
setlocale(0, ""); | |
const int size = 5; | |
int Masive[size] = { 1, 2, 3, 4, 5 }; | |
int Naznacheniya[size]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#include <string> | |
using namespace std; | |
// ДЗ 1 | |
//Задание 1 | |
/*double Stepeni(double base, int setepn) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
#include <conio.h> | |
#include <string> | |
using namespace std; | |
enum KeyCodes {ENTER = 13,ESCAPE = 27, LEFT = 75, RIGHT = 77, UP = 72, DOWN = 80, SPACEBAR = 32}; | |
enum Colors { GREEN = 2, YELLOW = 14, RED = 12, BLUE = 9, WHITE = 15}; | |
enum Objects {HALL = 0, WALL = 1, COIN = 2, ENEMY = 3, MEDICINE = 4}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <windows.h> | |
using namespace std; | |
// 1 Задание Функция для установки координат и цвета текста | |
void SetCursor(int x, int y, int color) | |
{ | |
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE); | |
COORD position = { static_cast<SHORT>(x), static_cast<SHORT>(y) }; | |
SetConsoleCursorPosition(hConsole, position); | |
SetConsoleTextAttribute(hConsole, color); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
using namespace std; | |
/*Задание 8*/ | |
void fillSpiralMatrix(int M) | |
{ | |
vector<vector<int>> matrix(M, vector<int>(M, 0)); | |
int num = 1; | |
int x = M / 2, y = M / 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
setlocale(0, ""); | |
/*Задание 1*/ | |
/*const int size = 5; | |
int arr[size]; | |
cout << "Введите 5 чисел: "; |