Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:00,620 --> 00:00:05,090
All right, so now it's time to solve this exercise together.
2
00:00:05,120 --> 00:00:06,680
My name is Vlad, as always.
3
00:00:06,710 --> 00:00:10,130
This is Alphatech, our C programming course.
4
00:00:10,460 --> 00:00:11,870
So let's start.
5
00:00:12,680 --> 00:00:16,960
First of all, what we need to understand is that we are going to receive two numbers.
6
00:00:16,970 --> 00:00:18,050
So let's go like this.
7
00:00:18,080 --> 00:00:21,910
So number one and number two, we will declare them.
8
00:00:22,670 --> 00:00:31,670
And later on, we will ask a user to enter number one and also to enter number two so that simply copy
9
00:00:31,670 --> 00:00:32,990
that and copy this.
10
00:00:33,650 --> 00:00:34,580
And there you go.
11
00:00:34,580 --> 00:00:38,300
Please enter number two using personam two.
12
00:00:39,560 --> 00:00:44,660
And now what we are going to do is to use the if condition.
13
00:00:44,670 --> 00:00:49,910
So if if statement now, we will specify the condition.
14
00:00:49,940 --> 00:00:57,540
So if no one equals to number two, then in this case we will print through.
15
00:00:58,040 --> 00:01:01,030
OK, that's what we were requested to do.
16
00:01:02,600 --> 00:01:09,500
And if this condition returns false or gave the result of this condition, once again, the if statement
17
00:01:09,500 --> 00:01:15,830
checks whether this condition will be true or false, this condition happens to be false.
18
00:01:15,830 --> 00:01:21,600
The result of this condition happens to be false, then this part of the ALS will be executed.
19
00:01:21,860 --> 00:01:24,440
And in this case, it will be just like that.
20
00:01:24,710 --> 00:01:25,660
So false.
21
00:01:25,670 --> 00:01:26,780
And there you go.
22
00:01:27,410 --> 00:01:30,830
So once again, what do we have here?
23
00:01:30,830 --> 00:01:31,790
Two numbers.
24
00:01:31,790 --> 00:01:34,000
Checking if they are the same.
25
00:01:34,310 --> 00:01:43,160
So one note, guys, before we will build and run is that pay close attention to use double equality
26
00:01:43,160 --> 00:01:49,700
sign, because if you would have used just one of them, then in this case you will simply assign the
27
00:01:49,700 --> 00:01:52,670
value of Naoum to into name one.
28
00:01:53,030 --> 00:01:58,490
And there is the returned result of the operation is probably successful operation.
29
00:01:58,670 --> 00:02:05,100
And based on that, you couldn't conclude anything regarding if they were the same or not.
30
00:02:05,450 --> 00:02:11,930
So if you're checking for equality, use double equality signs and basically that's how you should do
31
00:02:11,930 --> 00:02:12,040
it.
32
00:02:12,050 --> 00:02:15,710
So let's build and run it to make sure that everything works as expected.
33
00:02:15,720 --> 00:02:20,620
So three and five are not identical, not equal to one another.
34
00:02:20,900 --> 00:02:22,300
So let's build it once again.
35
00:02:22,310 --> 00:02:26,310
So two and two basically are the same numbers.
36
00:02:26,840 --> 00:02:30,260
So, yeah, I think this is for at least video.
37
00:02:30,260 --> 00:02:32,490
Guys, thank you so much for watching.
38
00:02:32,510 --> 00:02:33,880
Keep on practicing.
39
00:02:34,100 --> 00:02:38,750
Keep on moving forward and let's move on to more complicated exercise.
40
00:02:38,910 --> 00:02:39,640
I'll see you then.
3595
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.