diff --git a/lab1/image-1.png b/lab1/image-1.png deleted file mode 100644 index 1497ab7..0000000 Binary files a/lab1/image-1.png and /dev/null differ diff --git a/lab1/image.png b/lab1/image.png deleted file mode 100644 index 50029f2..0000000 Binary files a/lab1/image.png and /dev/null differ diff --git a/lab1/lab1.md b/lab1/lab1.md deleted file mode 100644 index 507317f..0000000 --- a/lab1/lab1.md +++ /dev/null @@ -1,60 +0,0 @@ -# ЛАБОРАТОРНАЯ РАБОТА №1 - -## Задание №1 - -``` - static void Main(string[] args) - { - string pokemonName = "Чармандер"; //имя покемона - string elemeniType = "Огонь"; //тип элементы - int level = 1; //уровень - int hp = 95; //здоровье - - Console.WriteLine($@"=== БАЗА ДАННЫХ ПОКЕМОНОВ === -Покемон: {pokemonName} -Стихия: {elemeniType} -Уровень: {level} | HP: {hp}"); //вывод - } -``` -###### Вывод: - -=== БАЗА ДАННЫХ ПОКЕМОНОВ === -Покемон: Чармандер -Стихия: Огонь -Уровень: 1 | HP: 95 - -![alt text](image-1.png) - -## Задание №2 - -``` - static void Main(string[] args) - { - Console.Write("Введите имя тренера: "); //вывод - string trainerName = Console.ReadLine(); //ввод из консоля - Console.Write("Введите имя покемона: "); - string pokemonName = Console.ReadLine(); - Console.Write("Введите стихию: "); - string elementType = Console.ReadLine(); - Console.Write("Введите регион: "); - string regionName = Console.ReadLine(); - - Console.WriteLine($@"**************************************** -ПААСПОРТ ПОКЕМОНА -Тренер: {trainerName} (Регион: {regionName}) -Покемон: {pokemonName} [Стихия: {elementType}] -****************************************"); //вывод - } -``` -###### Вывод: - -Введите имя тренера: Эш -Введите имя покемона: Булбазавр -Введите стихию: Трава -Введите регион: Канто -****************************************. -ПААСПОРТ ПОКЕМОНА -Тренер: Эш (Регион: Канто) -Покемон: Булбазавр [Стихия: Трава] -****************************************. -![alt text](image.png) \ No newline at end of file diff --git a/lab2/image-1.png b/lab2/image-1.png deleted file mode 100644 index d0a6562..0000000 Binary files a/lab2/image-1.png and /dev/null differ diff --git a/lab2/image-10.png b/lab2/image-10.png deleted file mode 100644 index 2d2fc46..0000000 Binary files a/lab2/image-10.png and /dev/null differ diff --git a/lab2/image-11.png b/lab2/image-11.png deleted file mode 100644 index 36f0ccf..0000000 Binary files a/lab2/image-11.png and /dev/null differ diff --git a/lab2/image-2.png b/lab2/image-2.png deleted file mode 100644 index a56800d..0000000 Binary files a/lab2/image-2.png and /dev/null differ diff --git a/lab2/image-3.png b/lab2/image-3.png deleted file mode 100644 index 2b6875a..0000000 Binary files a/lab2/image-3.png and /dev/null differ diff --git a/lab2/image-4.png b/lab2/image-4.png deleted file mode 100644 index f3361be..0000000 Binary files a/lab2/image-4.png and /dev/null differ diff --git a/lab2/image-5.png b/lab2/image-5.png deleted file mode 100644 index dd52c6d..0000000 Binary files a/lab2/image-5.png and /dev/null differ diff --git a/lab2/image-6.png b/lab2/image-6.png deleted file mode 100644 index 323fe5e..0000000 Binary files a/lab2/image-6.png and /dev/null differ diff --git a/lab2/image-7.png b/lab2/image-7.png deleted file mode 100644 index c37b1e1..0000000 Binary files a/lab2/image-7.png and /dev/null differ diff --git a/lab2/image-8.png b/lab2/image-8.png deleted file mode 100644 index 8851c16..0000000 Binary files a/lab2/image-8.png and /dev/null differ diff --git a/lab2/image-9.png b/lab2/image-9.png deleted file mode 100644 index 9fcd36e..0000000 Binary files a/lab2/image-9.png and /dev/null differ diff --git a/lab2/image.png b/lab2/image.png deleted file mode 100644 index b4ffecc..0000000 Binary files a/lab2/image.png and /dev/null differ diff --git a/lab2/lab2.md b/lab2/lab2.md deleted file mode 100644 index 47e3969..0000000 --- a/lab2/lab2.md +++ /dev/null @@ -1,152 +0,0 @@ -# ЛАБОРАТОРНАЯ РАБОТА №2 - -## БЛОК 1 - -### Задание №1 - -``` - static void Main(string[] args) - { - Console.WriteLine("=== ПРОКАЧКА ПОКЕМОНА ==="); //вывод - Console.Write("Введите базовое значение атаки покемона: "); //вывод, но запрашвает у пользователя - int baseAttack = Convert.ToInt32(Console.ReadLine()); //можно и так Convert - аналог Parse //вывод - Console.Write("Введите кол-во уровней: "); - int level = Convert.ToInt32(Console.ReadLine()); - - int finalAttack = baseAttack + (level * 5); //формула итоговой атаки = базовая_атака + (уровень * 5) - - Console.Clear(); //Очистка консоля, сначало запрашивает у пользователя, потом очищает консоль и выводит следующий итог - - Console.WriteLine($@"=== ПРОКАЧКА ПОКЕМОНА === -Базовое значение атаки покемона: {baseAttack} -Кол-во полученных уровней: {level}"); //вывод - - Thread.Sleep(1000); //таймер 1 сек - - Console.WriteLine("\nФормула итоговой атаки = базовая атака + (уровень * 5)"); - Console.WriteLine($"Итоговая атака равна {finalAttack}"); //вывод итоговой атаки - - } -``` - -###### ВЫВОД: - -![alt text](image.png) - -### Задане №2 - -``` - static void Main(string[] args) - { - int balance = 1500; //всего на балансе - int potion = 200; //1 зелье стоит 200 монеты - - Console.WriteLine("=== ПРОФИЛЬ ==="); - Console.WriteLine($@"Начальный баланс тренера: {balance} -Стоимость одного Зелья Лечения(Potion): {potion}"); - - Console.Write("Сколько понадобится зелье, чтобы купить: "); //вывод - int buy = Convert.ToInt32(Console.ReadLine()); //запрашивает кол-во у пользователя - int total = buy * potion; //всего итоговая оплата зелья - if (balance >= total) //проверка условие - { - balance -= total; //баланс снимает итоговой оплаты зелья - Console.WriteLine($"Стоимость {buy} зелье за {total}"); - Console.WriteLine("Успешная оплата!"); - Console.WriteLine($"Остаток на балансе: {balance}"); - } - else - { - Console.WriteLine("Недостаточно средств!"); //не хватает монеты, если покупают больше 8 зелье - } - } -``` - -###### ВЫВОД: - -Если хватает, то: - -![alt text](image-1.png) - -Если не хватает, то: - -![alt text](image-2.png) - - -## БЛОК 2 - -### Задание № 2.1 - -``` - -``` - -###### ВЫВОД: - -при hp >= 50 - -![alt text](image-3.png) - -при hp <= 49 & hp >= 21 - -![alt text](image-4.png) - -при hp <= 20 & hp >= 1 - -![alt text](image-5.png) - -при hp <= 0 - -![alt text](image-6.png) - -### Задание № 2.2 - -``` - static void Main(string[] args) - { - Console.WriteLine("Меню: 1 - Атака, 2 - Инвентарь, 3 - Сменить покемона, 4 - Побег"); //вывод - Console.Write("Выберите меню: "); - int menu = Convert.ToInt32(Console.ReadLine()); //запрашивает у пользователя - - switch (menu) - { - case 1: - Console.WriteLine("Покемон наносит быстрый удар!"); //1 клавиша - break; //конец и возвращает значение - case 2: - Console.WriteLine("Вы открыли сумку и применили Зелье Лечения."); //2 клавиша - break; - case 3: - Console.WriteLine("Вы отозвали покемона и выпустили нового!"); //3 клавиша - break; - case 4: - Console.WriteLine("Вы успешно сбежали из боя!"); //4 клавиша - break; - default: - Console.WriteLine("Неизвестная команда! Вы пропустили ход."); // неизвестная команда, если нажать любая клавиша кроме 1,2,3 и 4 - break; - } - } -``` - -###### ВЫВОД: - -Атака (при нажатии 1) - -![alt text](image-7.png) - -Инвентарь (при нажатии 2) - -![alt text](image-8.png) - -Сменить покемона (при нажатии 3) - -![alt text](image-9.png) - -Побег (при нажатии 4) - -![alt text](image-10.png) - -При нажатии любой клавиши, кроме 1-4, тогда появится неизвестная команда - -![alt text](image-11.png) \ No newline at end of file