1
00:00:01,220 --> 00:00:02,750
Hey, guys, what's up?

2
00:00:03,320 --> 00:00:07,500
So today was all one more interesting problem with the help of for loop.

3
00:00:08,600 --> 00:00:10,700
OK, so the problem treatment is very easy.

4
00:00:11,000 --> 00:00:14,990
We have to find it or the power be, but without using power function.

5
00:00:15,350 --> 00:00:16,880
So this is power function.

6
00:00:17,500 --> 00:00:17,700
OK.

7
00:00:18,260 --> 00:00:21,260
So we will not do this power function with the help of for loop.

8
00:00:21,560 --> 00:00:22,480
We have to find it.

9
00:00:22,550 --> 00:00:23,950
The power be OK.

10
00:00:24,290 --> 00:00:25,310
So we all know it.

11
00:00:25,340 --> 00:00:27,740
The power B is the same as E.

12
00:00:27,780 --> 00:00:28,790
Multiply A.

13
00:00:28,850 --> 00:00:29,810
Multiply A.

14
00:00:29,870 --> 00:00:31,730
Multiply A how many times.

15
00:00:31,940 --> 00:00:32,660
B times.

16
00:00:34,030 --> 00:00:34,260
OK.

17
00:00:34,520 --> 00:00:37,310
For example, if you want to calculate to do the power five.

18
00:00:37,430 --> 00:00:38,150
What do you do.

19
00:00:38,620 --> 00:00:41,420
Do do do do do do do.

20
00:00:41,450 --> 00:00:43,880
In total that is thirty two.

21
00:00:44,270 --> 00:00:44,480
OK.

22
00:00:44,750 --> 00:00:47,210
So eight of the power B is something like this.

23
00:00:48,020 --> 00:00:48,890
So what do we do.

24
00:00:49,130 --> 00:00:54,090
We will run a loop with time and we will run a loop B times and each time what I will do.

25
00:00:54,110 --> 00:00:55,490
I will take a variable answer.

26
00:00:55,850 --> 00:00:57,620
So answer equals answer.

27
00:00:57,740 --> 00:00:58,430
Multiply.

28
00:00:59,930 --> 00:01:00,180
OK.

29
00:01:00,410 --> 00:01:02,150
So this we have to do.

30
00:01:02,750 --> 00:01:06,830
I will take a variable answer and answer it cause I say multiply by a.

31
00:01:07,370 --> 00:01:10,790
So just like some we have initialized the same equals zero.

32
00:01:11,030 --> 00:01:13,660
So here I will initialize my answer to one.

33
00:01:14,210 --> 00:01:16,160
Otherwise my output will be wrong.

34
00:01:16,340 --> 00:01:16,570
OK.

35
00:01:16,640 --> 00:01:18,680
So we have to initialize answer equals one.

36
00:01:19,040 --> 00:01:21,920
Just like we have initialized some equals zero.

37
00:01:22,590 --> 00:01:22,760
OK.

38
00:01:23,240 --> 00:01:23,920
So let's see.

39
00:01:26,130 --> 00:01:28,470
So I'm naming this file as forward.

40
00:01:29,840 --> 00:01:35,990
So far, dard cpv father dard cbb.

41
00:01:53,010 --> 00:01:55,470
OK, so let's stick to the Moataz input.

42
00:01:56,010 --> 00:01:57,660
So and A and B, other two numbers.

43
00:01:57,900 --> 00:02:00,710
He was able to give us the value of A and B..

44
00:02:01,940 --> 00:02:02,160
OK.

45
00:02:02,580 --> 00:02:04,680
So we have something called power function.

46
00:02:05,010 --> 00:02:10,770
So A C out, B or W and buildable will take two numbers.

47
00:02:11,010 --> 00:02:12,780
E to the power B.

48
00:02:16,440 --> 00:02:17,570
OK, so.

49
00:02:22,490 --> 00:02:25,430
So this power function is an event function.

50
00:02:25,520 --> 00:02:31,260
It will take two numbers as input and it will give me our protest to the power of the power.

51
00:02:32,290 --> 00:02:32,570
OK.

52
00:02:33,050 --> 00:02:34,580
So this is inbuilt function.

53
00:02:36,840 --> 00:02:39,040
Now, this function has been defined.

54
00:02:39,460 --> 00:02:47,440
This function is defined in a high-Profile call, C met just like seen in C out are defined in this

55
00:02:47,440 --> 00:02:47,830
file.

56
00:02:48,610 --> 00:02:50,770
So a scene in C are defined in this way.

57
00:02:50,860 --> 00:02:52,240
So we included this file.

58
00:02:53,650 --> 00:02:57,040
So similarly, power is defined in a file called C Met.

59
00:02:57,070 --> 00:03:00,730
The functionality of power function is written in a file called See Met.

60
00:03:01,090 --> 00:03:06,820
So if we want to use Buhr W function power function in our code, we have to include this file.

61
00:03:07,450 --> 00:03:08,750
So let us include this file.

62
00:03:09,470 --> 00:03:11,410
But the vice compiler will show us at it.

63
00:03:11,830 --> 00:03:16,510
So let's see the compiler showing me error that he don't know what dispute W.

64
00:03:17,600 --> 00:03:21,610
So let us include the C math file.

65
00:03:21,680 --> 00:03:24,380
So include C Matt.

66
00:03:31,380 --> 00:03:33,140
Now, the compiler is not being error.

67
00:03:33,560 --> 00:03:37,040
For example, I want to find proof of the power faith allowed for this study.

68
00:03:37,820 --> 00:03:38,090
OK.

69
00:03:38,570 --> 00:03:41,690
So now let us do the same thing with the help of for loop.

70
00:03:42,050 --> 00:03:45,050
So initially, my answer will be one by one.

71
00:03:45,320 --> 00:03:50,660
If you log initialize as I will contain garbage, will you and your output will be wrong.

72
00:03:51,380 --> 00:03:53,960
So four and I equals one.

73
00:03:53,990 --> 00:03:57,290
How many times I have to run this loop, I have to run this loop b times.

74
00:03:58,880 --> 00:04:02,930
And what I will do, I will do answer equals answer.

75
00:04:03,110 --> 00:04:05,240
Multiply by E.

76
00:04:06,090 --> 00:04:06,380
OK.

77
00:04:07,040 --> 00:04:09,980
And finally I will see.

78
00:04:09,980 --> 00:04:12,500
I would answer.

79
00:04:13,130 --> 00:04:17,000
So this is all that we have to do to solve this easy problem.

80
00:04:17,920 --> 00:04:21,290
Now let's see whether our logic is correct or not.

81
00:04:23,680 --> 00:04:28,700
So I want to find the power five, so it had to do and I do to.

82
00:04:29,380 --> 00:04:32,740
So this 3DO is given by this board function.

83
00:04:32,770 --> 00:04:35,190
The second thing, too, is our answer.

84
00:04:36,850 --> 00:04:37,600
One more time.

85
00:04:39,990 --> 00:04:41,400
So I want to find.

86
00:04:42,730 --> 00:04:44,060
Tale to the power it.

87
00:04:46,610 --> 00:04:49,070
So my answer is correct.

88
00:04:49,190 --> 00:04:49,490
OK.

89
00:04:50,180 --> 00:04:51,870
So a court is correct.

90
00:04:52,460 --> 00:04:57,340
If you want to implement this question with the help of via loop, what do you do?

91
00:04:58,160 --> 00:04:58,940
You will write.

92
00:05:01,030 --> 00:05:03,770
First you racialize and I equals one.

93
00:05:04,530 --> 00:05:09,570
Then you will write the condition while I is less than articles to be.

94
00:05:10,560 --> 00:05:12,030
Then you will write.

95
00:05:12,150 --> 00:05:12,630
I'm sorry.

96
00:05:12,760 --> 00:05:17,940
Was answer multiply by a and then you will write I.

97
00:05:18,120 --> 00:05:19,230
Plus plus.

98
00:05:20,010 --> 00:05:21,690
So this is my initialization.

99
00:05:22,170 --> 00:05:23,850
This is my initialization.

100
00:05:24,720 --> 00:05:26,040
This is my condition.

101
00:05:26,220 --> 00:05:27,510
This is my condition.

102
00:05:28,020 --> 00:05:28,930
This is updated.

103
00:05:29,130 --> 00:05:30,840
And similarly, this is update.

104
00:05:31,990 --> 00:05:32,220
OK.

105
00:05:32,850 --> 00:05:38,160
So again, the principle behind the for loop and the way I look working is exactly same.

106
00:05:39,680 --> 00:05:42,860
So if you have any doubt in this question, you can ask me.

107
00:05:43,130 --> 00:05:43,360
OK.

108
00:05:43,790 --> 00:05:44,940
So inside see malfunction.

109
00:05:45,110 --> 00:05:53,000
We also have many functions like see out a security squirty means find these squirrelled.

110
00:05:53,090 --> 00:05:59,130
For example, I want to find this greater Delfi and Lexia, Brent and Lahn also.

111
00:05:59,480 --> 00:06:01,800
So I want to find us greater Duffy Eskew.

112
00:06:01,800 --> 00:06:03,710
Our dysfunction will give me the square root of it.

113
00:06:03,800 --> 00:06:06,350
And it is also defined in our defined called See Matt.

114
00:06:10,600 --> 00:06:13,040
So let's say the value of it is nine.

115
00:06:13,570 --> 00:06:16,900
And I want to find and let's say the value of B is for.

116
00:06:19,700 --> 00:06:20,630
Okay, so.

117
00:06:24,530 --> 00:06:26,330
So squared off, nine is three.

118
00:06:26,420 --> 00:06:28,160
And this is nine to the power for.

119
00:06:30,490 --> 00:06:31,030
OK, guys.

120
00:06:31,330 --> 00:06:32,880
So this is it for this video.

121
00:06:32,920 --> 00:06:34,660
If you have any doubt, feel free to ask.

122
00:06:34,750 --> 00:06:35,400
Thank you.
