Hey, guys, what's up?
So in the last class, we learned if if conditions now in this class, we will solve few problems to
get a better understanding how it works.
So the problem statement is very simple.
We will be given a number and use it will give us a number.
And and I have got a loser whether that number is art or even.
Again, so the logic is very simple.
I will check if no on dividing by two gives Rimando zero net means.
My number is even.
OK.
It is my number is ared, simple logic.
So let's see.
So what I'm going to do is I'm making a variable n c in and if.
No mard to.
Is giving me zero net means my number is even.
So see out.
Even.
Otherwise, what I'm gonna do is.
And my number is ARED.
As and Barry's ARD.
OK, so let's see.
Hesh in blue.
So let's say my number is five.
So five is our number.
And let's say my number is forward.
So it is even I'll go.
So this problem was very easy.
Let's do something more much more interesting than this silly problem.
So you have to tell me the output, let's say.
And it was when.
And X equals a blessed place.
And similarly, and Y equals blessed blessing.
And now I am branding C out X.
See outtakes.
See, I would weigh.
And see you out.
OK, so we have to tell me what will be my output if I run this myself called.
You can take your time.
So learning it.
So I'm out two days one, the three.
The value of X, the value of X is when VI is three and A's three.
If you got the same output.
Congratulations.
Your concepts are strong.
Otherwise.
I'm telling you how this how these values came.
So.
And it was one.
And X equals a plus plus and Y equals plus plus a.
So no problem is when initially.
Now at this line.
This is posted decrement, hence first aid will be assigned so that when Leo fixes when now it will
be implemented.
So the value phase to now focus on this line.
This is bringing Kliment.
So first.
Will be incremented.
So the radio phase three and now it will be assigned.
So the value of Y is three.
So orderly my output X is when Y is three A's three.
Some output is one.
Three, three.
One, three, three.
OK.
So let's do let's do something even more interesting.
Let's say
initially equals zero, and now I am checking if sorry, if a plus plus if this condition is true.
See out.
Hello.
OK.
And if this condition is followers see out, let's say, by.
OK, so this is my call.
So you ever tell me what will be my output?
You can post a video if you want to take some time.
So let let's send it.
So my output is by as expected.
Why am I output is my.
So.
A zero.
OK.
And in this current, I am writing gaudier.
So if a plus plus now focus on this.
This is post increment that means first evil be checked.
Then he will be implemented and the value of eight zero zero means falls.
So this condition is false.
And the valley of evil become when.
So if this condition is false, I will execute the code written in as blog.
That's why I am out for this coming out booby by.
OK.
So that is the reason my report was by.
Now, tell me what will remain.
But if I arrived.
OK, so let's E-Plus bless and let us bring the value of it also.
So we'll see you out.
Enderly and see out.
And although there will not be any defense because the value of a in both cases is going to be when
only.
OK, so bye.
And when?
Because is incremented.
Now, what will happen if I make it?
Plus plus a three increment.
Okay.
So let's see where it is going to happen.
So the value of is initially zero now and F blog I am having plus plus A since it is pre increment first,
it will be incremented.
So the value of AVL become when then this condition will be checked.
So the value of AIZMAN.
That means this condition is true.
Since this condition is true, this will be Hmoud for some output will be hello.
And the value of phase one of this is not important.
This is why this was important.
So now, Edward, is Halloween, when, hello and when?
OK.
Simple.
Thank you.