Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <windows.h>
using namespace std;
void Line(int lenght, char symb, int color, bool horizontal) {
if (lenght < 0)
cout << "Error: Length cannot be negative!" << "\n";
else {
HANDLE h = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(h, color);
#include <iostream>
#include <windows.h> // COORD HANDLE SetConsoleTextAttribute SetConsoleCursorPosition
#include <conio.h> // _getch
using namespace std;
enum GameObject : short { HALL, WALL, COIN, ENEMY, HEALTH_SUPPLY, EXIT };
enum Color : short {
BLACK, DARKBLUE, DARKGREEN, TURQUOISE, DARKRED,
PURPLE, DARKYELLOW, GREY, DARKGREY, BLUE, GREEN,
CYAN, RED, PINK, YELLOW, WHITE
#include <iostream>
using namespace std;
int main()
{
srand(time(0));
setlocale(0, "");
// 1st
#include <iostream>
using namespace std;
int main()
{
setlocale(0, "");
//1st
int result = 0;
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
setlocale(0, "");
//1st
#include <iostream>
using namespace std;
int main()
{
//1st
setlocale(0, "");
double uah;
cout << "Введите сумму в грн:\n";
#include <iostream>
using namespace std;
int main()
{
setlocale(0, "");
//1st