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> | |
#include <cstdlib> | |
#include <ctime> | |
#include <conio.h> | |
using namespace std; | |
enum direction { DOWN = 80, UP = 72, LEFT = 75, RIGHT = 77 }; |
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 <windows.h> | |
#include <iostream> | |
#include <conio.h> | |
using namespace std; | |
const int WIDTH = 45; | |
const int HEIGHT = 15; | |
enum maze_objects { HALL, WALL, COIN, ENEMY, APTEKA }; |
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> | |
#include <windows.h> | |
#include <cstdlib> | |
#include <ctime> | |
#include <algorithm> | |
using namespace std; | |
//1) Від 1 до 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
--1.Вивести кількість товарів кожної категорії, | |
-- середня ціна поставки яких більше 100 гривень. | |
SELECT cat.name КАТЕГОРІЯ, | |
COUNT(pr.id) КІЛЬКІСТЬ | |
FROM Delivery d | |
JOIN Product pr ON d.id_product = pr.id | |
JOIN Category cat ON pr.id_category = cat.id | |
GROUP BY cat.name |
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
--1.Показати назви товарів та їх виробників, а також тих виробників, | |
--у яких немає товарів. | |
SELECT pr.name ТОВАР, | |
prod.name ВИРОБНИК | |
FROM Product pr | |
RIGHT JOIN Producer prod ON pr.id_producer = prod.id | |
--2.Показати лише ті категорії, до яких не належить жоден товар. |
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
--1.Показати назви та категорії товарів, | |
--постачальниками яких є ООО "Паньки" або ООО «Які люди» | |
SELECT pr.name ТОВАР, | |
cat.name КАТЕГОРІЯ, | |
sup.name ПОСТАЧАЛЬНИК | |
FROM Delivery d | |
JOIN Supplier sup ON d.id_supplier = sup.id | |
FULL OUTER JOIN Product pr ON d.id_product = pr.id |
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> | |
#include <windows.h> | |
#include <cstdlib> | |
#include <ctime> | |
#include <algorithm> | |
using namespace std; | |
//1. Написати функцію Line, яку можна буде викликати так : Line(20, '@', 12, true); | |
//І при цьому горизонтально буде намальована лінія, що складається з 20 «собачок» червоного кольору. |
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
//Проект "Лабіринт" | |
//Завдання: | |
//Якщо персонаж дійшов до виходу з лабіринту в нижньому правому куті, | |
//гра завершується перемогою | |
//(вивести діалог із повідомленням : "Перемога – знайдено вихід"). | |
// | |
//Якщо всі монетки лабіринту зібрані, гра завершується перемогою | |
//(вивести діалог із повідомленням : "Перемога – монети зібрано"). | |
// | |
//Додати новий тип об'єктів лабіринту – "ліки", які при збиранні відновлюють здоров'я на 25 очок. |
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> | |
#include <windows.h> | |
#include <cstdlib> | |
#include <ctime> | |
#include <algorithm> | |
using namespace std; | |
int main() |
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 <iomanip> | |
#include <windows.h> | |
#include <cstdlib> | |
#include <ctime> | |
using namespace std; | |
#include <iostream> | |
int main() | |
{ |
NewerOlder