How many times will the following Apple Swift code print the word "green"?
for p in 21...34[
if p%2==1[
var a = "red"
var b: String?
var c = b ?? a
print( c)
}
else if p%3==2{
let a = "green"
let e = "red"
var f = e ?? a
print(f)
}
else(
var g = "green"
var h: String?
var k = h ?? g
print(k)
}
}
Correct Answer:
5
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Swift MCQ Questions