1
00:00:02,700 --> 00:00:04,700
Hello, everyone, and welcome back to the cause.

2
00:00:05,250 --> 00:00:09,030
So I hope all of you got to play with a little bit of C++.

3
00:00:09,510 --> 00:00:12,210
We have not done anything special in our last program.

4
00:00:12,630 --> 00:00:16,050
We just made a program that was printing something out to the user.

5
00:00:17,460 --> 00:00:20,670
So today in this video, we just do a very small problem.

6
00:00:21,030 --> 00:00:25,020
We will try to do something a little more interesting than what we did last time.

7
00:00:25,830 --> 00:00:27,630
But again, very, very simple problem.

8
00:00:28,140 --> 00:00:34,480
So what do you want to do is we want to take two numbers, add them up and give it out to the user.

9
00:00:35,310 --> 00:00:35,640
OK.

10
00:00:36,300 --> 00:00:36,480
OK.

11
00:00:36,540 --> 00:00:37,530
So nothing special.

12
00:00:37,950 --> 00:00:42,300
We will simply take two numbers, add them and we'll give our producer.

13
00:00:42,720 --> 00:00:43,320
That's it.

14
00:00:43,820 --> 00:00:44,120
OK.

15
00:00:44,670 --> 00:00:45,930
Let's get started on that.

16
00:00:51,290 --> 00:00:58,040
OK, so first of all, let us create a new file file, new and then empty file.

17
00:01:00,440 --> 00:01:01,280
Save file.

18
00:01:08,340 --> 00:01:10,820
Add to a number.

19
00:01:15,350 --> 00:01:17,390
And then dart CBP.

20
00:01:19,290 --> 00:01:19,610
Si.

21
00:01:20,730 --> 00:01:22,290
Okay, so let us write some code.

22
00:01:26,400 --> 00:01:27,140
Hash included.

23
00:01:27,410 --> 00:01:28,200
I will stream

24
00:01:31,080 --> 00:01:36,240
using using namespace SDD semicolon

25
00:01:38,910 --> 00:01:39,540
and main.

26
00:01:43,490 --> 00:01:47,780
And then I'm having it done zero.

27
00:01:49,090 --> 00:01:49,370
OK.

28
00:01:49,910 --> 00:01:50,870
So just a second.

29
00:01:59,370 --> 00:02:07,740
OK, so let's say my first number is 10, so I equals then and my second number is 15.

30
00:02:07,980 --> 00:02:10,680
So G equals fifteen.

31
00:02:11,900 --> 00:02:13,640
Don't forget to write him a column.

32
00:02:18,170 --> 00:02:20,060
So basically, what do you want here?

33
00:02:20,810 --> 00:02:24,770
I want the system to give me some memory in which I can store my data.

34
00:02:25,580 --> 00:02:28,100
So first of all, I will get some memory.

35
00:02:28,370 --> 00:02:29,690
I will store some detail in it.

36
00:02:30,050 --> 00:02:32,870
And after some time, I will have to assess the data.

37
00:02:33,530 --> 00:02:37,040
So we call this storage, this data variables.

38
00:02:39,980 --> 00:02:41,300
So what do we want?

39
00:02:44,840 --> 00:02:46,850
We basically need some space.

40
00:02:47,630 --> 00:02:50,180
We want the system to give us some space.

41
00:02:51,050 --> 00:02:52,520
We want to name it something.

42
00:02:52,940 --> 00:02:55,140
And we want to put some data inside it.

43
00:02:56,180 --> 00:02:57,410
Why do we want to name it?

44
00:02:58,100 --> 00:03:03,020
We want to name it so that later on when I want to assess the data, I have a way to do that.

45
00:03:04,730 --> 00:03:05,890
Okay, so let's see.

46
00:03:08,260 --> 00:03:09,030
Blandon.

47
00:03:13,680 --> 00:03:15,300
OK, so there is an added.

48
00:03:16,580 --> 00:03:18,440
And we can read their statement here.

49
00:03:18,770 --> 00:03:20,890
I was not declared in this court.

50
00:03:21,950 --> 00:03:25,670
This basically means my compiler doesn't know what is a.

51
00:03:27,240 --> 00:03:31,120
OK, so why this ad is coming and how we can resolve it.

52
00:03:36,980 --> 00:03:40,060
OK, see if I want to store some data in my brain.

53
00:03:40,570 --> 00:03:42,010
I have to do nothing special.

54
00:03:42,730 --> 00:03:45,430
I just need to say, hey, please do then.

55
00:03:45,970 --> 00:03:47,920
And it will restore somewhere in my brain.

56
00:03:48,880 --> 00:03:52,660
Similarly, a store fifteen, and it'll be stored somewhere.

57
00:03:53,260 --> 00:03:56,950
But to store data in a computer winterlude, something extra.

58
00:03:58,140 --> 00:04:01,290
OK, so let's see what extra work we have to do.

59
00:04:02,370 --> 00:04:06,900
So for storing retain our computer, we have to tell two more things.

60
00:04:15,850 --> 00:04:25,060
What do you want to store and how much space you want fostering or draw down and this problem?

61
00:04:26,800 --> 00:04:28,360
I want to store in deejay's.

62
00:04:32,520 --> 00:04:37,170
And now I have to tell one more thing, how big and tedious you understood.

63
00:04:38,970 --> 00:04:41,860
Do we want to store hundred or let's say a thousand?

64
00:04:42,350 --> 00:04:45,200
So these are very small numbers.

65
00:04:45,620 --> 00:04:45,860
OK.

66
00:04:45,950 --> 00:04:48,140
So under 10000 are these poll numbers.

67
00:04:48,500 --> 00:04:50,090
They require very less space.

68
00:04:51,080 --> 00:04:58,310
But what if if you want to store a big number, for example, one, two, three, four, five, six,

69
00:04:58,370 --> 00:05:01,820
seven, eight, nine, one one, one, two, three, four.

70
00:05:02,390 --> 00:05:07,220
So this is a very big number and it requires a lot of space.

71
00:05:07,850 --> 00:05:10,580
So we have to tell our system how much space we want.

72
00:05:11,210 --> 00:05:16,270
We want to buy it all we want for bite it, bite 16 bites.

73
00:05:16,520 --> 00:05:16,830
OK.

74
00:05:17,240 --> 00:05:18,530
So we have to two things.

75
00:05:18,920 --> 00:05:23,570
What do they want to store and how much space you want for storing your data?

76
00:05:25,880 --> 00:05:32,870
So in this case, I want to stay in business and I want to store decent size integers, my integers

77
00:05:32,900 --> 00:05:35,590
will not be too large and it will not be too small.

78
00:05:40,220 --> 00:05:42,260
OK, so we need to right here.

79
00:05:42,370 --> 00:05:42,680
And.

80
00:05:49,970 --> 00:05:50,840
And similarly.

81
00:05:53,100 --> 00:05:53,640
Indigene.

82
00:05:59,330 --> 00:06:02,090
So in Dimmeys, indigent.

83
00:06:04,480 --> 00:06:07,660
And in desert data type our first due to diapers.

84
00:06:08,350 --> 00:06:16,780
And so I did a tape tells us two things what data you are storing and how much space you want for storing

85
00:06:16,780 --> 00:06:17,310
that data.

86
00:06:18,780 --> 00:06:23,070
So in this problem, I want to store in Tejas.

87
00:06:25,600 --> 00:06:28,300
And my teachers will be of four bytes.

88
00:06:31,080 --> 00:06:34,070
But how big in pages begins drawing for Bite's?

89
00:06:35,370 --> 00:06:37,290
We will discuss it in upcoming we do's.

90
00:06:39,590 --> 00:06:41,300
OK, so let's solve this problem.

91
00:06:43,990 --> 00:06:48,040
So I need one more variable, let's say the name of the variable is key.

92
00:06:48,460 --> 00:06:50,070
And what is there a low key?

93
00:06:50,740 --> 00:06:51,820
I plus G.

94
00:06:53,080 --> 00:06:54,320
I bless G.

95
00:06:56,080 --> 00:06:57,910
And then what will I do?

96
00:06:57,970 --> 00:07:01,630
I will bring Turkey because my answer is invariable.

97
00:07:02,620 --> 00:07:04,700
So we'll see our turkey and then semicolon.

98
00:07:05,540 --> 00:07:05,730
OK.

99
00:07:05,800 --> 00:07:07,180
So virtually my answer.

100
00:07:07,300 --> 00:07:09,630
My answer should be 25.

101
00:07:10,270 --> 00:07:11,200
So, Ballenden.

102
00:07:14,710 --> 00:07:16,540
And my answer is twenty five.

103
00:07:17,370 --> 00:07:17,590
OK.

104
00:07:20,830 --> 00:07:23,390
OK, so what if I want to change my life, if I.

105
00:07:24,250 --> 00:07:25,540
So we can easily do that?

106
00:07:25,960 --> 00:07:27,270
I will simply write I.

107
00:07:27,710 --> 00:07:28,810
It calls Hardeen.

108
00:07:28,960 --> 00:07:31,390
For example, the new radio of I is putting.

109
00:07:32,110 --> 00:07:33,900
There is no need of writing intention.

110
00:07:37,530 --> 00:07:38,950
OK, so what is happening?

111
00:07:40,380 --> 00:07:43,970
My aim was to change the value of I, so I will simply write.

112
00:07:44,070 --> 00:07:44,890
I was 13.

113
00:07:45,290 --> 00:07:47,280
There is no need of writing in indigene.

114
00:07:48,670 --> 00:07:49,940
And what is happening here?

115
00:07:51,370 --> 00:07:53,140
I have my memory for bite's.

116
00:07:55,390 --> 00:07:57,690
The name of this memories, eh?

117
00:07:58,060 --> 00:07:59,590
And here I am having an.

118
00:08:01,020 --> 00:08:02,800
OK, so what this state run will do?

119
00:08:03,480 --> 00:08:04,970
It was simply right, Hardeen here.

120
00:08:05,830 --> 00:08:06,120
OK.

121
00:08:07,110 --> 00:08:11,350
There's no need of writing in again, because we don't want to create a separate memory.

122
00:08:11,680 --> 00:08:12,880
We just want to write to.

123
00:08:13,600 --> 00:08:13,860
OK.

124
00:08:14,260 --> 00:08:15,680
Similarly, you can write like this.

125
00:08:15,710 --> 00:08:16,040
J.

126
00:08:16,140 --> 00:08:16,590
Question.

127
00:08:16,660 --> 00:08:18,160
So the new LFG will be done.

128
00:08:18,870 --> 00:08:19,140
OK.

129
00:08:19,870 --> 00:08:22,870
So you can change the value of any variable at any time.

130
00:08:23,400 --> 00:08:25,450
And there is no need of writing in Dugin.

131
00:08:27,570 --> 00:08:28,990
OK, so let us all.

132
00:08:29,090 --> 00:08:30,250
And then interesting problem.

133
00:08:37,640 --> 00:08:40,040
Suppose I want to calculate simple interest.

134
00:08:43,910 --> 00:08:49,100
Simple interest calculator.

135
00:08:52,950 --> 00:08:53,920
Nazi BP.

136
00:09:01,320 --> 00:09:09,330
Hash include ice cream using namespace SDD

137
00:09:13,170 --> 00:09:17,610
and demesne, and then I'm having it done Zettl.

138
00:09:25,290 --> 00:09:27,560
OK, so I want to keep it simple interest.

139
00:09:28,610 --> 00:09:30,020
OK, so what is the form love?

140
00:09:30,020 --> 00:09:30,950
Simple interest.

141
00:09:31,940 --> 00:09:38,630
Simple interest equals principle multiplied it multiplied time wholly divided by hundred.

142
00:09:39,990 --> 00:09:42,020
Okay, so I need four variables here.

143
00:09:43,580 --> 00:09:46,610
And B, B for principal LEMSIP.

144
00:09:47,030 --> 00:09:47,840
Let's leave.

145
00:09:47,880 --> 00:09:52,350
Principle is handed and then semicolon.

146
00:09:52,790 --> 00:09:54,890
And ah, let's say 10.

147
00:09:56,810 --> 00:09:57,860
Entity time.

148
00:09:58,140 --> 00:09:59,190
Let's say five years.

149
00:10:00,490 --> 00:10:06,850
And end simple interest it principal multiplied eight multiplied.

150
00:10:06,880 --> 00:10:11,070
Time divided, way handed and then semicolon.

151
00:10:11,590 --> 00:10:14,290
So after calculating simple interest, what will I do?

152
00:10:14,410 --> 00:10:15,820
I will bring simple interest.

153
00:10:16,090 --> 00:10:16,810
So see old.

154
00:10:18,380 --> 00:10:19,310
Simple interest.

155
00:10:20,830 --> 00:10:22,790
Okay, so let's say it, Cornford.

156
00:10:31,560 --> 00:10:34,320
And B hundred.

157
00:10:36,600 --> 00:10:43,590
And greed equals then an end time equals.

158
00:10:43,980 --> 00:10:45,060
Suppose five years.

159
00:10:47,280 --> 00:10:49,480
And simple interest.

160
00:10:51,450 --> 00:10:51,690
It.

161
00:10:53,230 --> 00:10:59,270
Principle, multiply it eight multiplied time and then wholly divided by hundred.

162
00:11:04,810 --> 00:11:11,200
And then some column after concluding simple interest, see out simple interest.

163
00:11:16,560 --> 00:11:18,240
Okay, so virtually my output.

164
00:11:19,860 --> 00:11:20,400
Let's see.

165
00:11:22,020 --> 00:11:23,460
So simple industry equals.

166
00:11:24,560 --> 00:11:28,520
And dirty and 210 and five divided by hundred.

167
00:11:30,300 --> 00:11:31,650
So my eyes should be 50.

168
00:11:32,160 --> 00:11:33,500
OK, so let's wait and then.

169
00:11:35,950 --> 00:11:36,560
Ballenden.

170
00:11:39,250 --> 00:11:42,360
So my answer is fifteen, which is hundred percent correct.

171
00:11:44,210 --> 00:11:46,490
OK, so that is all for this video.

172
00:11:46,640 --> 00:11:47,420
Thanks for watching.
