From 0c367835cb683e726d0f48b5a76a906f871f02fb Mon Sep 17 00:00:00 2001 From: Stas Date: Mon, 21 Sep 2026 08:23:17 +0000 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D1=82?= =?UTF-8?q?=D1=8C=20lesson2.kotlin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lesson2.kotlin | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 lesson2.kotlin diff --git a/lesson2.kotlin b/lesson2.kotlin new file mode 100644 index 0000000..16dfaeb --- /dev/null +++ b/lesson2.kotlin @@ -0,0 +1,25 @@ +fun main(){ + // Данные задания 1 + print ("Доступные ходы") + val currentTurnInput = readln() + + print ("Количество энергии: 5") + val energyInput = readln() + + print ("Коэффицент усилинея атаки: 2") + val multiplierInput = readln() + + val currentTurn: Int = currentTurnInput.toInt() + val energy: Int = energyInput.toInt() + val multiplier: Double = multiplierInput.toDouble() + + println("=== ИНИЦИАЛИЗАЦИЯ ПАРАМЕТРОВ ХОДА ===") + println("Текущий ход: 4 $currentTurn (тип int)") + println("Доступно энергии: 3 $energy (тип int)") + println("Множитель урона: 1.5 $multiplier (тип double)") + + + + + val inputString: String = readln() // Пользователь ввел "60" + val healValue: Int = inputString.toInt() // Значение 60 с типом Int \ No newline at end of file