How do you print in swift only the even numbers from 1-10 in a range of 1...100? -
create range 1 100. utilize print out numbers between 1 , 10. you'll need utilize if statement combined loop pull off.
consider office hours. seek this:
for number in 1...100 { if number%2 == 0 && number < 11 { println(number) } }
swift numbers
No comments:
Post a Comment