RosettaCodeData/Task/Loops-Break/Swift/loops-break.swift

12 lines
174 B
Swift
Raw Permalink Normal View History

2016-12-05 23:44:36 +01:00
while true
{
let a = Int(arc4random()) % (20)
print("a: \(a)",terminator: " ")
if (a == 10)
{
break
}
let b = Int(arc4random()) % (20)
print("b: \(b)")
}