So our next Condor's statement is why loop statement?
So while it's also similar to our follow up, but it will always execute anthology when cognition is
full, I'm blessed that that condition is false.
It will not stop executing right.
So this index is very simple.
Why condition true?
We should give it conditional on a year basis.
Often then it is the execution block race US boss.
So you can see the flow chart to understand it.
So while there is a condition condition, espoo condition is true.
Then a core block is executed.
Then it goes.
After the executing of the core block, it will again check condition.
If it is true again, it will again execute this.
If the condition is barzagli, then it leaves the bloc and continues with the execution of that program.
So why do you have to be careful?
Is why creating wild conditions?
You have to make sure that at some point of time, conditions should be hours and it will be leaving
the program because if it is not Foy's, this will be an infinite loop because condition is now becoming
a force.
That means this block will be continued to execute many times, writing infinite times because this
is ticking through, executing again, ticking through executing.
So it will continue that infinite times and the program may not be stopping program will be infinite.
So that said, back thing, right, that our programming will not be executed, that will be in bad
situation.
So make sure that you will.
Give a condition we usually give the condition in such area that the condition should be forced at some
point of time only after the number of times we want that program to be executed without that cord blood
to be executed that many times or lead should actually execute.
So that's one thing we need to make sure we are losing, right?
No statements.
So next, we will be going to a wireless program.
So have a book by Alexander programme for you.
Here you can see I have given IEEE equal to zero as the value, and when the value of AI is less than
five, then you have to print.
If the value of AI is reaching five or more than five.
You have to see from this look, this is a simple program, just printing numbers from zero to five.
OK.
So I hear you can see is greater than five are equal to zero.
AI is less than five.
It's true.
No.
Then I will be printing AI.
That just zero.
Then I will be incrementing AI is No.
One.
So it's again going to the condition.
Check back.
I use one one less than five true.
Then it will be printing one going again due to less than five.
True.
Again.
Three.
Print.
True.
Right.
Likewise, it will mean one zero one, two, three and four Wyden-Bennett will, and it will reach right.
Then it will go check five less than five spots.
So it will exit that.
This very block, it will come to that next step, which is the end of the program.
So it will exit that program.
Now see, we can see this program in action.
Let me clear the cancer cleared it.
Now let me
compile this program.
G Plus Plus Wild Dog CBB.
Successfully, no, because that I don't know why at us now we can dodge, slash and get up.
I'm sorry and thought out I used to.
Yes.
Zero one, two three.
This is the album, which I have explained.
So that's it.
It's very simple to use my.
But make sure that there should be an exit condition if the exact condition is not getting properly
identified or given, this can be an infinite loop.
We have doorway lock statements, so do well.
New statements are also used to execute vibrations or execute a block many number of times, according
to your usage.
But there is a difference between small difference between Duval and why you do.
My loop is executed at least once because it's an exit control room, which means so we have to.
Then we've open the bracket, then we have a lot of things to execute.
That statements will be written on this lot.
Then we close the loop, then we have way and condition.
So fast execute the block.
Then it goes and check the condition.
So at least once this block will be executed.
So do car block.
If condition is true, then it will go to the tower block again.
Then it will check the condition again with conditions to again execute God when the weather conditions
for it just get outside the loop.
So one more thing, one more note, one more thing.
I have already explained this thing that is it will execute on at least once because it will check the
condition after the initial execution.
It will condition check the condition at the last point after executing that code block.
Let's see this one in action.
So I have a two mile program over here.
Here you can see my head up high and I have included that.
Then I have eight or 10, then I am protecting the value of being equal to.
Then I'm printing in that.
Then I am incriminating them, I look forward to one that is A. To plus one plus one equals 11.
Then I am taking the.
Condition 10 less than is true, right?
So what does output of this program, at least the smell this look will continue to execute until he's
less than 20.
So then what number this will show up?
Brent, can you guess it?
Yes, you are right.
It will be printing until 10 to 19 because on reaching 20, this condition become false.
So we're going to see this program in action, clearing that I'm sorry again, I'm doing the.
G Plus Plus for compiling this program, though, while not CBB, No.
One, I'm going to run this program.
Does my running government dodge slash, you know?
See value of from 10 to 19.
There is no guarantee because this condition will be becoming false because 19 after nine, it's will
be 20 20 less than during these wars, so it will not execute this again, this block.
It will just go out of that program.
So hope you have understood this portion as well.