1
00:00:00,780 --> 00:00:04,230
There is one other keyword that you can use in for loop.

2
00:00:04,260 --> 00:00:11,610
In many cases, your for loop will have many lines of code and at some point you may decide that the

3
00:00:11,610 --> 00:00:17,520
current loop has completed and you want to start the next loop or more specifically execute the loop

4
00:00:17,520 --> 00:00:20,130
expression and then test the condition.

5
00:00:20,130 --> 00:00:25,410
So to do this you can call the continue continue keyword here.

6
00:00:25,410 --> 00:00:27,390
So let's create another loop here.

7
00:00:27,390 --> 00:00:36,150
So for float my var here zero point f and.

8
00:00:37,400 --> 00:00:38,710
My while.

9
00:00:38,780 --> 00:00:42,680
My war is less than 10.4 byte float.

10
00:00:44,150 --> 00:00:47,840
Uh, then increment my var by one.

11
00:00:49,340 --> 00:00:50,480
And STD.

12
00:00:52,380 --> 00:00:57,570
Or we don't need this city because we used the namespace here and that's why I'm going to write the

13
00:00:57,600 --> 00:00:58,680
C out.

14
00:01:01,050 --> 00:01:03,390
My war and.

15
00:01:04,480 --> 00:01:05,530
If here.

16
00:01:05,530 --> 00:01:12,310
If if my var var equals to zero, then just.

17
00:01:14,100 --> 00:01:14,970
Print a new line.

18
00:01:16,730 --> 00:01:21,200
See out and line here and continue.

19
00:01:23,260 --> 00:01:25,750
And then see out here.

20
00:01:32,370 --> 00:01:36,240
My var here and end line.

21
00:01:39,130 --> 00:01:40,630
This is our example code.

22
00:01:40,630 --> 00:01:45,730
So in this code we print the reciprocal of the numbers 0 to 9.

23
00:01:45,940 --> 00:01:53,190
If zero point F, as you know, the zero point f is a four byte floating point literal.

24
00:01:53,200 --> 00:02:00,880
So the first line in the for loop prints the loop variable here and the next line checks to see if the

25
00:02:00,880 --> 00:02:03,430
variable is equal to zero.

26
00:02:03,430 --> 00:02:08,170
So if it is, it prints a new line and continues here.

27
00:02:09,270 --> 00:02:14,250
That is is the last line in the for loop is not executed here.

28
00:02:14,250 --> 00:02:20,400
So the reason is that the last line prints the reciprocal and it will be an error to divide any number

29
00:02:20,400 --> 00:02:21,960
by zero here.

30
00:02:21,960 --> 00:02:23,670
Let's try it out.

31
00:02:25,580 --> 00:02:25,880
Here.
