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> | |
#include <cmath> | |
#include <algorithm> | |
using namespace std; | |
// ПОЧАТОК КОДУ ЗАДАЧІ | |
// 1. Написати програму, яка пропонує користувачеві ввести радіус | |
// окружності, а потім обчислює площу та довжину цієї окружності. |
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
USE [master] | |
GO | |
/****** Object: Database [Цінники] Script Date: 08.03.2025 0:37:17 ******/ | |
CREATE DATABASE [Цінники] | |
CONTAINMENT = NONE | |
ON PRIMARY | |
( NAME = N'Цінники', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER01\MSSQL\DATA\Цінники.mdf' , SIZE = 8192KB , MAXSIZE = UNLIMITED, FILEGROWTH = 65536KB ) | |
LOG ON | |
( NAME = N'Цінники_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL16.MSSQLSERVER01\MSSQL\DATA\Цінники_log.ldf' , SIZE = 8192KB , MAXSIZE = 2048GB , FILEGROWTH = 65536KB ) | |
WITH CATALOG_COLLATION = DATABASE_DEFAULT, LEDGER = OFF |
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
USE [Цінники] | |
-- 1. Порахувати можливий дохід за автоматичні вимикачі та рубильники (з урахуванням знижок на ці товари). | |
SELECT ROUND(SUM(price_EUR * (1 - discount / 100) * quantity), 2) | |
AS 'Виручка за автоматичні вимикачі та рубильники, євро' | |
-- https://learn.microsoft.com/ru-ru/sql/t-sql/language-elements/in-transact-sql?view=sql-server-ver16 | |
-- https://learn.microsoft.com/ru-ru/sql/t-sql/functions/round-transact-sql?view=sql-server-ver16 | |
-- https://learn.microsoft.com/ru-ru/sql/t-sql/functions/sum-transact-sql?view=sql-server-ver16 | |
FROM [dbo].[Електротовари] | |
WHERE category IN ('TMAX moulded case circuit breakers', 'ETIMAT Circuit breakers', |
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> // щоб використати функцію SetConsoleOutputCP | |
#include <string> // щоб застосувати рядковий тип | |
#include <cstdlib> // для роботи з генерацією випадкових чисел | |
#include <ctime> // те саме | |
using namespace std; | |
// ПОЧАТОК КОДУ ЗАДАЧІ | |
// 1. Реалізувати калькулятор. Вводяться 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
#include <iostream> // для роботи з потоками вводу/виводу | |
#include <windows.h> // щоб використати функцію SetConsoleOutputCP | |
#include <cstdlib> // для роботи з генерацією випадкових чисел | |
#include <ctime> // те саме | |
#include <string> // щоб застосувати рядковий тип | |
#include <cmath> // математична бібліотека | |
#include <iomanip> // для налаштування вирівнювання | |
using namespace std; |
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> // щоб використати функцію SetConsoleOutputCP | |
#include <cstdlib> // для роботи з генерацією випадкових чисел | |
#include <ctime> // те саме | |
#include <algorithm> // зокрема, функції для роботи з масивом | |
#include <cmath> // математична бібліотека | |
#include <iomanip> // для налаштування вирівнювання | |
#include <string> // щоб застосувати рядковий тип | |
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
USE Store | |
-- https://gist.github.com/sunmeat/59dc33337af869024a7b18602b556b00 | |
-- Бажано побудувати діаграму бази даних за посиланням. | |
-- 1. Показати назви та категорії товарів, постачальниками яких є ООО "Паньки" | |
-- або ООО «Які люди», вірніше 'Смачний Стіл Знову' або 'Котигорошко'. | |
SELECT p.name [Товар], c.name [Категорія], s.name AS [Перевірка постачальника] | |
FROM Delivery d | |
JOIN Product p ON d.id_product = p.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 <windows.h> // щоб використати функцію SetConsoleOutputCP | |
#include <cmath> // математична бібліотека | |
using namespace std; | |
// Завдання на функції (7 задач) | |
// ПОЧАТОК КОДУ ЗАДАЧІ |
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
USE Store | |
-- https://gist.github.com/sunmeat/59dc33337af869024a7b18602b556b00 | |
-- Бажано побудувати діаграму бази даних за посиланням. | |
-- 1. Показати назви товарів та їх виробників, а також тих виробників, | |
-- у яких немає товарів. | |
SELECT p.name [Товар], vyr.name [Виробник] | |
FROM Product p | |
RIGHT JOIN Producer vyr ON p.id_producer = vyr.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 <windows.h> | |
#include <conio.h> // _getch | |
#include <ctime> | |
#include <cstdlib> | |
using namespace std; | |
// Розміри ігрового поля (глобальні константи як виняток) | |
const int HEIGHT = 25; |