From 6522dc6c11b9bab9e74eafb84232e8ab3eb75056 Mon Sep 17 00:00:00 2001 From: Loser <19+loser@noreply.localhost> Date: Fri, 25 Sep 2026 12:42:09 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D1=82=D1=8C=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20=C2=AB?= =?UTF-8?q?1=20=D0=9B=D0=B0=D0=B1=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 1 Лаб/4.1.txt | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 1 Лаб/4.1.txt diff --git a/1 Лаб/4.1.txt b/1 Лаб/4.1.txt new file mode 100644 index 0000000..aff3391 --- /dev/null +++ b/1 Лаб/4.1.txt @@ -0,0 +1,13 @@ +fun main() { + var deckSize = 60 + var cardsInHand = 0 + print("Кол-во карт в начале матча: ") + val targetDrawInput = readln() + val targetDraw = targetDrawInput.toInt() + while ((cardsInHand <= targetDraw) && (deckSize > 0)) { + cardsInHand++ + deckSize-- + println("Взята карта №$cardsInHand В руке: $cardsInHand карт, в колоде осталось: $deckSize") + } + +} \ No newline at end of file