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); |
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 class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<link rel="stylesheet" href="css/style.css"> | |
<meta name="description" content=""> | |
</head> |
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> | |
using namespace std; | |
int main() | |
{ | |
srand(time(0)); | |
setlocale(0, ""); | |
// 1st |
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>hello world!</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
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title></title> | |
<link rel="stylesheet" href="css/style.css"> | |
<link rel="icon" href="/favicon.ico" sizes="any"> | |
<link rel="icon" href="/icon.svg" type="image/svg+xml"> |
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="icon" type="image/svg+xml" href="/webstorm-icon-logo.svg" /> | |
<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
#include <iostream> | |
using namespace std; | |
void obmin(int* a, int* b) { | |
int c = *a; | |
*a = *b; | |
*b = c; | |
} | |
int main() { |