From 7bd284d4574e60f78737a9ff7208af9af752b680 Mon Sep 17 00:00:00 2001 From: vais88 Date: Tue, 21 Nov 2023 18:10:23 +0300 Subject: [PATCH] =?UTF-8?q?KS-2-4.=20=D0=A0=D0=B0=D1=81=D1=87=D0=B5=D1=82?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=B3=D0=BE=D0=B4=D1=8B=20=D0=BE=D1=82=2020%=20?= =?UTF-8?q?=D0=B1=D0=B0=D1=84=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/kotlin/lesson_2/lesson2_task4.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 src/main/kotlin/lesson_2/lesson2_task4.kt diff --git a/src/main/kotlin/lesson_2/lesson2_task4.kt b/src/main/kotlin/lesson_2/lesson2_task4.kt new file mode 100644 index 0000000..f2faa5a --- /dev/null +++ b/src/main/kotlin/lesson_2/lesson2_task4.kt @@ -0,0 +1,18 @@ +package lesson_2 + +fun main() { + val crystalOre = 7 + val ironOre = 11 + baf20CrystalOre(crystalOre) + baf20IronOre(ironOre) +} + +fun baf20CrystalOre(value: Int) { + val baf20 = value * 20/100 + println("Количество \"бонусных\" crystal ore: $baf20") +} + +fun baf20IronOre(value: Int) { + val baf20 = value * 20/100 + println("Количество \"бонусных\" iron ore: $baf20") +} \ No newline at end of file