Hi guys today, I'm going to teach the concept of variable variable mean
which is the data which can store under the memory, not permanently its temple
This is the simple definition of variable. First of all, we'll see how to create the variable
You can create the variable of any name. You can create as a variable like X or whatever name you can create
as variable. But another important task is you can't create the variable as a number
You can't create the variable as any halt number. You can't create as a variable
first
X
mean this is the variable. I'm going to store some data equal A
X mean it's called a variable. 10. Mean is a data that 10 goes and goes to store
under this variable X can all 10
This is the meaning of variable when you're creating the variable. Another important task is you have to specify the
data type, which is the appropriate data type. You are going to store the store this 10 variable
So this is
integer. So this is the considered as integer because it is a number you have to specify the data type as
integer, integer. Mean it, this is called as indicator
This how you can create the variable if you want to store some
string string ma how can you store as a string value? String value means some text
So
this is the string variable
some ABC, something like that
some variable I put it here. So you have to specify the data type string
This text is belongs to string, data type
X can or ABC string value. It belongs to data type string
isn't it? If you store the integer value numbers, it is belongs to integer data type
This is the basic three task. This is the meaning as data type
This is
called as variable
variable can hold any data
This is the
meaning by data
If you don't take a note of it, this is a very important task when you are creating the variables
This is the basic task
Got I hope you, you you all understand this concept. Very basic concept if you want to store some decimal
point values. So
I put the creative variable and 3rd
and decline some salary like this
I put the data type
double
that mean you can store the pointing values
you can store any this point values. You can
it belongs to double data type
Got it
OK. I hope you guys all understand these concepts. Let me move
move into the some example. So it is very helpful for you all
Let me remove this
1st. I'm going to
Declare two numbers and calculated the total
First I input two numbers. 10 comma 20. I want to calculate and display the to how to do this
task using variable
Declaring to be integer variables, integer variables and calculator and display the talk
So first in X is one variable. So 10
again, didn't why
another variable
I have input two data, 10 and 20. It's, it's all, all
10 store um 10 can store uh 10 x can store 10 y can store
20
I'm going to calculate. So in dot equal X plus Y
Now what happened is
what, what do you mean by X X all 10 by all 20
So here 10 comes 20 comes both that and so into
thought variable
Now you are going to print the value conor dot right line
After you write, you have to read the, read the, read the variable
So you have to call the red line method
When you execute the program
you can get the output ass to it
This how you can create the variable and calculate the calculate to
to the, to this data and get the output like this. I know
I hope you guys you all enjoy this tutorial. You can get in touch with my upcoming tutorial
Please subscribe my channel. Thanks