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
<!DOCTYPE html> | |
<html lang="uk"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>JS Завдання</title> | |
<style> | |
body { | |
font-family: Arial, sans-serif; | |
padding: 20px; | |
display: flex; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<p>Написать функцию, которая принимает 2 числа и возвращает меньшее из них.</p> | |
<p>Написать функцию, которая принимает от 1 до 5 чисел и возвращает большее из них.</p> | |
<p>Написать функцию, которая возводит переданное число в указанную степень.</p> |
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
app.js | |
// на выбор есть 20 заданий, необходимо выполнить любые 5 из них. | |
// очень желательно разобраться со spread, rest, closure, arrow functions, function expressions и по возможности показать это в решениях. | |
// 1. Написать функцию, которая принимает 2 числа и возвращает -1, если первое меньше чем второе, 1 — если первое больше чем второе и 0 — если числа равны. | |
function compareNumbers(a, b) { | |
if (a < b) { | |
return -1; | |
} else if (a > b) { |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<link rel="stylesheet" href="public/style.css"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>WS playground</title> | |
<link rel="stylesheet" href="/style.css"> | |
</head> | |
<body> |
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
на выбор есть 20 заданий, необходимо выполнить любые 5 из них. | |
очень желательно разобраться со spread, rest, closure, arrow functions, function expressions и по возможности показать это в решениях. | |
1. Написать функцию, которая принимает 2 числа и возвращает -1, если первое меньше чем второе, 1 — если первое больше чем второе и 0 — если числа равны. | |
2. Написать функцию, которая вычисляет факториал переданного ей числа. | |
3. Написать функцию, которая принимает три отдельные цифры и превращает их в одно число. Например: цифры 1, 4, 9 превратятся в число 149. | |
4. Написать функцию, которая принимает длину и ширину прямоугольника и вычисляет его площадь. Если в функцию передали 1 параметр, то она вычисляет площадь квадрата. | |
5. Написать функцию, которая проверяет является ли переданное ей число совершенным. Совершенное число — это число, равное сумме всех своих собственных делителей. | |
6. Написать функцию, которая принимает минимальное и максимальное значения для диапазона и выводит только те числа из диапазона, которы |
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); |