Use This: var intInput = Int(readLine() ?? "0")! print(intInput + 2) Or, if you want to first make sure that it can be turned into an Integer:
確定! 回上一頁