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