From 5b815903d46f858c74de29264cfdb1d3b1df8fd0 Mon Sep 17 00:00:00 2001 From: ArhaNge1 Date: Wed, 21 Oct 2026 14:33:29 +0300 Subject: [PATCH] commit --- works/lab-02/lesson2/.gitignore | 32 ++++++++++++++++++++++++++++++++ works/lab-02/lesson2/src/Main.kt | 22 ++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 works/lab-02/lesson2/.gitignore create mode 100644 works/lab-02/lesson2/src/Main.kt diff --git a/works/lab-02/lesson2/.gitignore b/works/lab-02/lesson2/.gitignore new file mode 100644 index 0000000..3ddbf4c --- /dev/null +++ b/works/lab-02/lesson2/.gitignore @@ -0,0 +1,32 @@ +### IntelliJ IDEA ### +out/ +!**/src/main/**/out/ +!**/src/test/**/out/ + +### Kotlin ### +.kotlin + +### Eclipse ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache +bin/ +!**/src/main/**/bin/ +!**/src/test/**/bin/ + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ + +### VS Code ### +.vscode/ + +### Mac OS ### +.DS_Store \ No newline at end of file diff --git a/works/lab-02/lesson2/src/Main.kt b/works/lab-02/lesson2/src/Main.kt new file mode 100644 index 0000000..aac8f04 --- /dev/null +++ b/works/lab-02/lesson2/src/Main.kt @@ -0,0 +1,22 @@ +//TIP To Run code, press or +// click the icon in the gutter. +fun main() { + print("Введите номер текущего хода: ") + val currentTurnInput: String = readln() + print("Количество доступной энергии: ") + val energyInput: String = readln() + print("коэффициент усиления атаки: ") + val multiplierInput: String = readln() + val currentTurn: Int = currentTurnInput.toInt() + val energy: Int = energyInput.toInt() + val multiplier: Double = multiplierInput.toDouble() + + + println("""=====Инициализация параметров хода==== + | Текущий ход: $currentTurn + | Доступно энергии: $energy + | Множитель урона: $multiplier + | ==================================== + """.trimMargin()) + +} \ No newline at end of file