1 00:00:00,810 --> 00:00:09,480 So next type of control statements in C++ hydration statements, and we have three types of hydration 2 00:00:09,480 --> 00:00:11,250 statements in C++. 3 00:00:11,970 --> 00:00:18,900 So in the case of hydration statements, it means like we have to repeatedly do something some action. 4 00:00:19,320 --> 00:00:26,850 So if we are repeating some action that despite hydration and programmatically, we want to repeat something, 5 00:00:26,850 --> 00:00:29,070 we can use hydration statements. 6 00:00:29,250 --> 00:00:31,260 So we have three application statements. 7 00:00:31,470 --> 00:00:35,730 One is for statement and that is my statement and address Norway in a statement. 8 00:00:36,000 --> 00:00:37,530 Let's see each of them in action. 9 00:00:39,520 --> 00:00:48,250 So in case of false statements, we do have that condition, but until that condition is satisfied that 10 00:00:48,940 --> 00:00:57,730 block of statements will be executed continuously, the soda indexes for bracket doping initialization, 11 00:00:57,730 --> 00:01:02,320 which is the initial condition, we will see that in action shortly on our program. 12 00:01:02,830 --> 00:01:07,600 Then in then we have to give that condition how it should be done. 13 00:01:08,800 --> 00:01:12,810 What is the condition which need to be checked, then increment or decrement. 14 00:01:13,000 --> 00:01:18,790 Our value should be commended or we can then the value statements, the block of statements which will 15 00:01:18,790 --> 00:01:27,730 be coming inside that particular false statements, then here are so we have the floor for that unit 16 00:01:27,850 --> 00:01:28,480 condition. 17 00:01:28,660 --> 00:01:35,920 If condition is true, that block will be executed, then the value of condition checking will be incrementally 18 00:01:35,920 --> 00:01:36,730 or be commended. 19 00:01:36,970 --> 00:01:38,740 Then again, it will check the condition. 20 00:01:38,890 --> 00:01:44,950 If there are business again, it will execute again, then it will increment again or condition through 21 00:01:44,950 --> 00:01:45,520 execute. 22 00:01:45,760 --> 00:01:51,310 Whenever the condition becomes false, then only this part block stops executing until the conditions. 23 00:01:51,310 --> 00:01:53,170 Screw it in our race execute. 24 00:01:53,650 --> 00:01:55,450 You are a little bit confused. 25 00:01:55,660 --> 00:01:59,980 So let's directly general clinic summary of this false statement. 26 00:02:00,370 --> 00:02:03,430 So I have it simply before statement program. 27 00:02:03,440 --> 00:02:06,100 I want to hear so you can see the scene. 28 00:02:06,100 --> 00:02:07,320 That's all here, right? 29 00:02:08,230 --> 00:02:10,210 First of all, let me clear that answer for you. 30 00:02:10,810 --> 00:02:11,290 See? 31 00:02:12,450 --> 00:02:14,940 So we have four entirely equal to zero. 32 00:02:15,480 --> 00:02:19,900 I less than or equal to 10 i.e. equal pay plus two. 33 00:02:19,950 --> 00:02:21,090 Why did this program? 34 00:02:21,090 --> 00:02:27,010 Actually, that's actually how debatable kadhai the initial value of every ABC. 35 00:02:28,780 --> 00:02:29,170 OK. 36 00:02:30,130 --> 00:02:34,370 After the initial value, it will go straight into this formula. 37 00:02:34,570 --> 00:02:40,120 So this floor for Bronk is actually starting out here on the seven plane. 38 00:02:40,690 --> 00:02:42,980 And what is going it, it is doing. 39 00:02:43,390 --> 00:02:44,590 See how tight it just. 40 00:02:44,590 --> 00:02:46,600 I got busy and all it will be friendly. 41 00:02:47,350 --> 00:02:47,860 Zero. 42 00:02:49,150 --> 00:02:50,420 Then what happens? 43 00:02:50,500 --> 00:02:51,610 It will go away again. 44 00:02:51,730 --> 00:02:55,270 And here it will practically go to this part. 45 00:02:55,720 --> 00:02:58,650 Here you can see eye to eye bluster. 46 00:02:58,660 --> 00:03:02,530 This is not a that expression or or determined expression. 47 00:03:02,770 --> 00:03:05,610 So here you can see iiK or by +2. 48 00:03:05,620 --> 00:03:06,430 What will happen? 49 00:03:06,760 --> 00:03:08,710 The value of AI is currently zero. 50 00:03:08,860 --> 00:03:12,910 It will be AI plus two that is zero plus two or two two. 51 00:03:13,270 --> 00:03:20,470 Then it will go and check that this part of that false statement that this condition taking so do is 52 00:03:20,470 --> 00:03:21,790 less than or equal to 10. 53 00:03:22,520 --> 00:03:22,730 Right. 54 00:03:22,850 --> 00:03:26,590 I was I better here, so it would be coming out again and taking the value. 55 00:03:26,830 --> 00:03:31,780 Now it's two two is less than or equal to 10 to is less than a week or two, then it's true. 56 00:03:31,960 --> 00:03:38,070 So it will again go to the statement by I block the flow of on block and it will see I. 57 00:03:38,240 --> 00:03:40,280 I use no do right. 58 00:03:40,690 --> 00:03:49,960 Similarly, I go by +2 repeats until the value is becoming less than or equal to X. 59 00:03:51,340 --> 00:03:56,770 As the value is less than or equal propeny, it will exit from that block. 60 00:03:57,040 --> 00:04:02,350 So you would have got that kind of idea about the output of the program. 61 00:04:03,220 --> 00:04:04,840 Let's see this program in action. 62 00:04:05,350 --> 00:04:15,090 So let's compare this to C++ for Dart CVP combined. 63 00:04:15,940 --> 00:04:18,860 Let's run this dart slash here. 64 00:04:18,880 --> 00:04:19,180 Don't. 65 00:04:22,500 --> 00:04:26,280 Zero, two, four six, eight eight. 66 00:04:26,460 --> 00:04:27,390 This is not expected. 67 00:04:27,750 --> 00:04:30,210 I think you also expected this output, right? 68 00:04:30,720 --> 00:04:32,670 Maybe you have got diarrhea. 69 00:04:32,670 --> 00:04:37,350 And so the initial value, if I was zero, it will be check that that initial bite. 70 00:04:37,660 --> 00:04:40,140 Then it dad actually goes to this. 71 00:04:41,190 --> 00:04:46,290 Followed in cell block that does see our time that will bring zero. 72 00:04:48,150 --> 00:04:52,830 Then what happened, it will come here, which is not bad expression of that for Luke. 73 00:04:53,160 --> 00:04:54,960 Then it will update the value of fight. 74 00:04:55,120 --> 00:05:00,190 I provide +2 sociopolitical due to benefit is go to that condition. 75 00:05:00,660 --> 00:05:04,000 And it takes two is greater than or equal to 10. 76 00:05:04,020 --> 00:05:04,800 So it's brutal. 77 00:05:05,070 --> 00:05:09,540 So it really again come to follow, then it will bring up to. 78 00:05:10,760 --> 00:05:17,370 Similarly, this continues like it will become for here, then it will check for less than 10 rainfall 79 00:05:17,690 --> 00:05:18,460 that's already here. 80 00:05:18,950 --> 00:05:20,480 Labor six eight. 81 00:05:20,660 --> 00:05:24,270 So what happens when it reaches 10 10 also? 82 00:05:24,290 --> 00:05:28,430 No, I just don't suppose this continued on this week, just eight or 10. 83 00:05:28,850 --> 00:05:31,280 I less than 10. 84 00:05:31,280 --> 00:05:33,020 So it's colder than it's true. 85 00:05:33,200 --> 00:05:35,510 It comes again and it will print 10. 86 00:05:36,200 --> 00:05:38,360 So it predicting then what happens? 87 00:05:38,390 --> 00:05:42,440 It will go again to this park incrementally increment update. 88 00:05:42,440 --> 00:05:43,880 But then what happens? 89 00:05:44,450 --> 00:05:47,750 I equaled by +2, which means 10 plus two equals to Tyler. 90 00:05:48,030 --> 00:05:53,570 So I think we're totally here now with regard to the conditions, I think, but rather greater than 91 00:05:53,570 --> 00:05:54,230 our record low. 92 00:05:54,350 --> 00:05:55,660 And No. 93 00:05:55,850 --> 00:05:59,180 10 is not great land and people do sorry less than a week or two. 94 00:05:59,360 --> 00:06:01,700 And so the condition is false. 95 00:06:01,880 --> 00:06:02,830 Then what happens? 96 00:06:03,290 --> 00:06:09,500 This poor statement is skipped and it will end the program because no more lanes are there after this 97 00:06:09,500 --> 00:06:10,070 bold statement. 98 00:06:10,070 --> 00:06:12,910 So is this the end of the program? 99 00:06:12,920 --> 00:06:17,990 So after then, when it is reaching well, it will not display that value. 100 00:06:18,380 --> 00:06:25,160 I suppose if I am leaving, is the old statement after this bold statement to check whether the value 101 00:06:25,160 --> 00:06:32,780 of I have changed or returned to new value, I will give a clear which will see out. 102 00:06:32,780 --> 00:06:40,580 I actually, according to our logic, ask what my explanation when it was waiting here that should be 103 00:06:40,580 --> 00:06:41,180 tell, right? 104 00:06:41,480 --> 00:06:47,060 So let me run this programme after executing that, after compiling that. 105 00:06:48,460 --> 00:06:51,190 Let's see what is the next value which would be coming. 106 00:06:51,260 --> 00:07:01,230 OK, OK, OK, well, here you have you can see the variable is having value here from here to here 107 00:07:01,250 --> 00:07:03,780 only because it's a local variable. 108 00:07:06,190 --> 00:07:11,680 That's more regarding Scott, that we will explore while we are learning that we have a separate topic 109 00:07:11,680 --> 00:07:12,010 on that. 110 00:07:12,970 --> 00:07:15,100 So I again am trying to. 111 00:07:17,490 --> 00:07:21,030 Yes, now it's executing, it's good. 112 00:07:23,350 --> 00:07:26,340 See, now you can see why you can see both. 113 00:07:27,070 --> 00:07:32,140 You can understand that after reaching 12, it exited from this ballroom. 114 00:07:32,380 --> 00:07:38,500 But after exiting the follow it game across a new statement which was asking to butt in that current 115 00:07:38,500 --> 00:07:39,150 value of life. 116 00:07:39,460 --> 00:07:43,330 And after executing the load, we do as well right side. 117 00:07:43,330 --> 00:07:51,700 But under this guidance that many of you have bought this program, so let's move to the next control 118 00:07:51,700 --> 00:07:52,270 statement.