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 | |
Создать массив из 10 случайных чисел и написать несколько функций для работы с ним. | |
Функция принимает массив и выводит его на экран. | |
Функция принимает массив и выводит только четные элементы. | |
Функция принимает массив и возвращает сумму всех элементов массива. | |
Функция принимает массив и возвращает его максимальный элемент. | |
Функция добавления нового элемента в массив по указанному индексу. | |
Функция удаления элемента из массива по указанному индексу. |
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
Написать функцию, которая принимает 2 числа и возвращает -1, если первое меньше чем второе, 1 — если первое больше чем второе и 0 — если числа равны. | |
const number = function (a,b) | |
{ | |
if(a<b) return -1; | |
if(a>b) return 1; | |
return 0; | |
} | |
console.log(number(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
Запросіть у користувача число, зведіть це число в 2 ступінь та виведіть на екран. | |
function Mark() { | |
x = prompt("Введите число "); | |
y= x**2; | |
alert(y); | |
} | |
Mark(); | |
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
using System.Net.Http; | |
using System.Text.Json; | |
using System.Net.Mail; | |
using System.Net; | |
class Program | |
{ | |
static async Task 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
using RestSharp; | |
using System.Text.Json; | |
class Program | |
{ | |
static async Task 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
using System; | |
class Program | |
{ | |
static async Task Main() | |
{ | |
Console.Title = "Гороскоп: сделайте выбор знака"; |
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
using System; | |
using System.Collections.Generic; | |
using System.Runtime.InteropServices; | |
using System.Text; | |
class WindowManager | |
{ | |
[DllImport("user32.dll")] | |
public static extern int EnumWindows(EnumWindowsProc lpEnumFunc, int lParam); |
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
111111 | |
CREATE FUNCTION GetAllDatabases() | |
RETURNS TABLE AS RETURN | |
( | |
SELECT | |
name AS [База Данных], | |
size * 8 AS [Размер в КБ], | |
(size * 8) / 1024.0 AS [Размер в МБ], |
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. Написать хранимую процедуру, которая показывает общее количество проданных товаров в каждой из категорий и от каждого производителя. | |
CREATE PROCEDURE GetSalesAnalysis2 AS | |
BEGIN | |
SELECT | |
c.name AS [Категория], | |
p2.name AS [Производитель], | |
SUM(s.quantity) AS [Кол Прод Тов] | |
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
111111111 | |
1. Показать среднее арифметическое трёх вещественных чисел, хранящихся в переменных | |
--DECLARE @a decimal(10,2) = 15.75; | |
--DECLARE @b decimal(10,2) = 23.45; | |
--DECLARE @c decimal(10,2) = 18.90; | |
--DECLARE @average DECIMAL(10,2); |
NewerOlder