+ 1
I have another swift question...
In THIS CODES DISCRIPTION IT SAID A while loop performs a set of statements until a condition becomes false. These kinds of loops are best used when the number of iterations is not known before the first iteration begins. while evaluates its condition at the start of each pass through the loop. The while loop is demonstrated in the example below WHAT DOES IT TRYING TO SaY CAN YOU GUYS PLEA HELP, MY ENGLISH IS BAD:( THANKS, THIS IS THE CODE UNDER IT while a < b { print(a) a+=1 }
4 ответов
+ 1
while age < 18 {
mayIDrinkAlcohol(age)
increaseEachYear(age)
}
Does this help? 😉 Or...
answer = 0
while answer < 42 {
print("This is not the answer")
answer = answer + 1
}
+ 1
First of all, no you may not drin alcachole it is bad.... second of all, what do you mean by answer +1
+ 1
thanks tho
0
answer + 1 increases the number by one. If the number would not change, the loop would be infinite, because the condition 'while answer < 42' would evaluate as true forever.