Загрузить файлы в «1 Лаб»

This commit is contained in:
2026-09-25 12:42:09 +00:00
parent 4dfedde48e
commit 6522dc6c11
+13
View File
@@ -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")
}
}