Hey, guys, what's up?
So today was all one more interesting problem with the help of for loop.
OK, so the problem treatment is very easy.
We have to find it or the power be, but without using power function.
So this is power function.
OK.
So we will not do this power function with the help of for loop.
We have to find it.
The power be OK.
So we all know it.
The power B is the same as E.
Multiply A.
Multiply A how many times.
B times.
OK.
For example, if you want to calculate to do the power five.
What do you do.
Do do do do do do do.
In total that is thirty two.
OK.
So eight of the power B is something like this.
So what do we do.
We will run a loop with time and we will run a loop B times and each time what I will do.
I will take a variable answer.
So answer equals answer.
Multiply.
OK.
So this we have to do.
I will take a variable answer and answer it cause I say multiply by a.
So just like some we have initialized the same equals zero.
So here I will initialize my answer to one.
Otherwise my output will be wrong.
OK.
So we have to initialize answer equals one.
Just like we have initialized some equals zero.
OK.
So let's see.
So I'm naming this file as forward.
So far, dard cpv father dard cbb.
OK, so let's stick to the Moataz input.
So and A and B, other two numbers.
He was able to give us the value of A and B..
OK.
So we have something called power function.
So A C out, B or W and buildable will take two numbers.
E to the power B.
OK, so.
So this power function is an event function.
It will take two numbers as input and it will give me our protest to the power of the power.
OK.
So this is inbuilt function.
Now, this function has been defined.
This function is defined in a high-Profile call, C met just like seen in C out are defined in this
file.
So a scene in C are defined in this way.
So we included this file.
So similarly, power is defined in a file called C Met.
The functionality of power function is written in a file called See Met.
So if we want to use Buhr W function power function in our code, we have to include this file.
So let us include this file.
But the vice compiler will show us at it.
So let's see the compiler showing me error that he don't know what dispute W.
So let us include the C math file.
So include C Matt.
Now, the compiler is not being error.
For example, I want to find proof of the power faith allowed for this study.
OK.
So now let us do the same thing with the help of for loop.
So initially, my answer will be one by one.
If you log initialize as I will contain garbage, will you and your output will be wrong.
So four and I equals one.
How many times I have to run this loop, I have to run this loop b times.
And what I will do, I will do answer equals answer.
Multiply by E.
OK.
And finally I will see.
I would answer.
So this is all that we have to do to solve this easy problem.
Now let's see whether our logic is correct or not.
So I want to find the power five, so it had to do and I do to.
So this 3DO is given by this board function.
The second thing, too, is our answer.
One more time.
So I want to find.
Tale to the power it.
So my answer is correct.
OK.
So a court is correct.
If you want to implement this question with the help of via loop, what do you do?
You will write.
First you racialize and I equals one.
Then you will write the condition while I is less than articles to be.
Then you will write.
I'm sorry.
Was answer multiply by a and then you will write I.
Plus plus.
So this is my initialization.
This is my initialization.
This is my condition.
This is updated.
And similarly, this is update.
OK.
So again, the principle behind the for loop and the way I look working is exactly same.
So if you have any doubt in this question, you can ask me.
OK.
So inside see malfunction.
We also have many functions like see out a security squirty means find these squirrelled.
For example, I want to find this greater Delfi and Lexia, Brent and Lahn also.
So I want to find us greater Duffy Eskew.
Our dysfunction will give me the square root of it.
And it is also defined in our defined called See Matt.
So let's say the value of it is nine.
And I want to find and let's say the value of B is for.
Okay, so.
So squared off, nine is three.
And this is nine to the power for.
OK, guys.
So this is it for this video.
If you have any doubt, feel free to ask.
Thank you.