1
00:00:04,150 --> 00:00:05,140
Programming and speech.

2
00:00:05,920 --> 00:00:11,860
So why we're hosting suites, it's more easy to give the condition compared to these fair statement.

3
00:00:12,130 --> 00:00:15,820
So we have written if there's a program here, right?

4
00:00:16,750 --> 00:00:22,990
But we have to use if then a condition and or the one any good to everything we have to repeat.

5
00:00:22,990 --> 00:00:29,380
N.A. n.a. n.a. The three languages we have to repeat this condition for checking the same number and

6
00:00:29,750 --> 00:00:34,630
repeatedly the later condition, and you have to be more specific in that.

7
00:00:34,960 --> 00:00:41,290
So switch games as, say, kind of a shortcut to help us to check the conditions.

8
00:00:41,290 --> 00:00:43,540
So that's why we use that switch statement.

9
00:00:43,630 --> 00:00:51,210
So I have returned the same program to display kind of month name, according to the month, the number

10
00:00:51,880 --> 00:00:53,360
using switch statements.

11
00:00:53,380 --> 00:00:55,390
Let's see how it's more efficient.

12
00:00:56,290 --> 00:01:00,790
Here you can see I haven't declared I have month number.

13
00:01:00,790 --> 00:01:02,230
I am asking for them number.

14
00:01:02,470 --> 00:01:03,670
Then I am using suites.

15
00:01:04,180 --> 00:01:07,480
So just providing yen into the switch.

16
00:01:07,720 --> 00:01:08,590
So what happens?

17
00:01:08,840 --> 00:01:13,840
Whatever input you send, use it will come to that switch statements.

18
00:01:14,140 --> 00:01:17,110
So if it is one, then it will go the case.

19
00:01:17,130 --> 00:01:19,600
What if it is due, it will go to the case.

20
00:01:19,990 --> 00:01:21,940
If it is three, it will go to the case.

21
00:01:22,180 --> 00:01:30,640
Similarly, I have the cases up to 10 right and there is a default case are safe in any of the cases

22
00:01:30,640 --> 00:01:31,570
is not matching.

23
00:01:31,780 --> 00:01:34,810
Then I can even add on a stage that is invalid.

24
00:01:35,320 --> 00:01:36,310
Number, please try again.

25
00:01:36,460 --> 00:01:43,000
So switch makes our life more easier compared to if I see a statement.

26
00:01:43,150 --> 00:01:45,160
So what about the execution of the program?

27
00:01:45,280 --> 00:01:47,920
Let's try compiling this and executing this.

28
00:01:48,130 --> 00:01:50,410
Is there any difference between the execution?

29
00:01:50,590 --> 00:01:51,100
Let's see.

30
00:01:52,550 --> 00:01:57,260
So I'm trying to campaign this program, G Plus Plus Switch.

31
00:01:59,600 --> 00:02:11,560
E G e e c, b b CBB tender, no eye on us in my program, so that's why it's actually campaigned successfully

32
00:02:11,570 --> 00:02:11,930
now.

33
00:02:12,200 --> 00:02:16,520
Let's try Strader output, not slash in tandem.

34
00:02:17,500 --> 00:02:24,130
Seats asking me for them my number, and I'm due February, it's the right answer, I'm executing this

35
00:02:24,130 --> 00:02:28,360
program again and giving I value, I would say the month.

36
00:02:28,450 --> 00:02:30,100
No, it's 17.

37
00:02:30,370 --> 00:02:32,650
It's asking me in that number.

38
00:02:32,660 --> 00:02:33,460
Please try again.

39
00:02:33,690 --> 00:02:38,380
See, both programs are given me have given me same output.

40
00:02:38,590 --> 00:02:41,740
What about the efficiency of programs?

41
00:02:42,010 --> 00:02:43,370
This is more simple.

42
00:02:43,570 --> 00:02:47,260
I need more to write, check and eager to.

43
00:02:47,260 --> 00:02:49,030
One n.a. n.a. three.

44
00:02:49,150 --> 00:02:53,250
And there is no need to write if as if any subversive like that, right?

45
00:02:53,440 --> 00:02:55,000
It's only eight one.

46
00:02:55,300 --> 00:03:02,140
What should be the output, if it is one, is the number march and we now put the two is the No.

47
00:03:02,560 --> 00:03:07,290
Similarly, you can give any kind of constant and is not a number.

48
00:03:07,520 --> 00:03:08,560
It means an integer.

49
00:03:09,610 --> 00:03:14,020
Then or so you can actually go with that straight statements.

50
00:03:14,050 --> 00:03:20,570
That's the beauty of using suite statements compared to compared to the given statements.

51
00:03:20,570 --> 00:03:22,720
So more have the same.

52
00:03:23,290 --> 00:03:26,720
Help us to do the same logic makes it just more efficient.

53
00:03:27,130 --> 00:03:29,950
So that is a small exercise for you.

54
00:03:30,310 --> 00:03:36,730
Try writing some more programs or finding out some more programs which have been written using speech

55
00:03:36,730 --> 00:03:46,300
statements and see how we can leverage on sweet statements for like doing something more easy compared

56
00:03:46,330 --> 00:03:46,600
to.

57
00:03:47,650 --> 00:03:49,480
Our different statements.

58
00:03:51,560 --> 00:03:54,170
So the end of this section also.
