Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func commandLine() {
- var doubleArray = [Double]()
- while doubleArray.count < 3 {
- print("Please enter a double number")
- if let numberString = readLine() {
- if let numb = Double(numberString) {
- doubleArray.append(numb)
- } else {
- print("Please enter a valid number!")
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment