Files
base-kotlin/1 Лаб/4.1.txt
T

13 lines
461 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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")
}
}