//
// main.swift
// RandomBingo
//
// Created by 조소야 on 2023/04/05.
//
import Foundation
var computerChoice = Int.random(in: 1...10)
var myChoice: Int = 0
print("RandomBing Start!!")
while true {
print("숫자를 입력해주세요.")
var userInput = readLine()
if let input = userInput {
if let number = Int(input) {
myChoice = number
}
}
if computerChoice > myChoice {
print("Up")
} else if computerChoice < myChoice {
print("Down")
} else {
print("Bingo!!")
break // 반복문을 종료
}
}