This file contains hidden or 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; | |
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); |
This file contains hidden or 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> // 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 |
This file contains hidden or 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() | |
{ | |
srand(time(0)); | |
setlocale(0, ""); | |
// 1st |
This file contains hidden or 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, ""); | |
//1st | |
int result = 0; |
This file contains hidden or 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 <iomanip> | |
using namespace std; | |
int main() | |
{ | |
setlocale(0, ""); | |
//1st |
This file contains hidden or 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() | |
{ | |
//1st | |
setlocale(0, ""); | |
double uah; | |
cout << "Введите сумму в грн:\n"; |
This file contains hidden or 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, ""); | |
//1st | |