Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
using namespace std;
int main()
{
setlocale(0, "");
/*Задание 1*/
/*const int size = 5;
int arr[size];
cout << "Введите 5 чисел: ";
#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;
#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);
#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};
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
// ДЗ 1
//Задание 1
/*double Stepeni(double base, int setepn)
{
#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];
#include <iostream>
using namespace std;
// Задание 1
/*int main()
{
setlocale(0, "");
int a = 10;
double b = 20.0;
string c = "30";
char d = 'x';
#include <iostream>
#include <Windows.h>
using namespace std;
//Задание 1
/*int main()
{
setlocale(0, "");
char str[256], ch;
int count = 0;
#include <iostream>
using namespace std;
struct Point
{
double x, y;
};
struct Rectangle
{
Point bottomLeft;
#include <iostream>
using namespace std;
#pragma warning(disable:4996)
int main()
{
setlocale(0, "");
char word[100];
char theme[100];