generated from admin/template
Добавить works/lab-02/src
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
задание 1.1
|
||||||
|
Console.WriteLine("=== Прокачка покемона ===");
|
||||||
|
Console.Write("Введите базовую атаку ");
|
||||||
|
int bsdmg = int.Parse(Console.ReadLine());
|
||||||
|
Console.Write("Введите уровень ");
|
||||||
|
int level = int.Parse(Console.ReadLine());
|
||||||
|
int enddmg = bsdmg+(level*5);
|
||||||
|
Console.WriteLine($"Итоговая атака: {enddmg}");
|
||||||
|
|
||||||
|
Задание 1.2
|
||||||
|
int balanceTrainer = 1500;
|
||||||
|
Console.WriteLine($"Текущий баланс: {balanceTrainer} монет ");
|
||||||
|
int oneHealingPotion = 200;
|
||||||
|
Console.Write("Укажите количество зелей которые вы хотите приобрести: ");
|
||||||
|
int countbuyPotion = int.Parse(Console.ReadLine());
|
||||||
|
balanceTrainer = balanceTrainer - oneHealingPotion * countbuyPotion;
|
||||||
|
Console.WriteLine($"Вы успешно купили и ваш остаток сдреств: {balanceTrainer}");
|
||||||
Reference in New Issue
Block a user