Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <windows.h>
#include <conio.h>
using namespace std;
void log_in();
void main_menu();
void admin();
void sign_in();
void admin_menu();
SELECT p.name, AVG(s.price)
FROM Product p
JOIN Sale s ON p.id = s.id_product
GROUP BY p.name
HAVING AVG(s.price) > 100
SELECT c.name, p.name, SUM(s.price)
FROM Category c
#include <iostream>
#include <windows.h> // COORD HANDLE SetConsoleTextAttribute SetConsoleCursorPosition
#include <conio.h> // _getch
using namespace std;
//1) Task
void print_num(int num, int one = 1) {
if (one > num) {
cout << "FINISH!!!";
}
SELECT p.name, c.name
FROM Product p
JOIN Producer pr ON p.id_producer = pr.id
JOIN Category c ON p.id_category = c.id
WHERE pr.name = 'ООО "Паньки"' OR pr.name = 'ООО "Які люди"'
SELECT p.name [Product], pr.name [Producer], c.name [Category]
FROM Product p
JOIN Producer pr ON p.id_producer = pr.id
SELECT p.name [Product],
pr.name [Producer]
FROM Product p RIGHT OUTER JOIN Producer pr ON p.id_category = pr.id
SELECT c.name[Categories],
p. name [Product]
FROM Product P RIGHT OUTER JOIN Category c ON p.name = NULL
#include <iostream>
#include <windows.h> // COORD HANDLE SetConsoleTextAttribute SetConsoleCursorPosition
#include <conio.h> // _getch
using namespace std;
enum GameObject : short { HALL, WALL, COIN, ENEMY };
enum Key : short {
LEFT = 75, RIGHT = 77, UP = 72, DOWN = 80,
ENTER = 13, SPACE = 32, ESCAPE = 27, BACKSPACE = 8
#include <iostream>
#include <windows.h>
#include <algorithm>
#include <iomanip>
#include <conio.h>
#include <ctime>
using namespace std;
#include <iostream>
#include <windows.h>
#include <algorithm>
#include <iomanip>
#include <conio.h>
#include <ctime>
using namespace std;
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
setlocale(LC_ALL, "RU");
SetConsoleCP(CP_UTF8);
#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
SetConsoleOutputCP(CP_UTF8);
//1) Task