Hello, everyone, and welcome back to the cause.
So in the last class, we did two programs in those two programs.
What we did was we just took two integers and we added them in the end of their example.
We just took a few integers and we converted simple interest based on them.
OK, so let's make those problems a little more interesting.
So.
Instead of taking and I quote, Spin and Jagels fifteen.
We will let the user give us what are the two numbers?
But do they want us to add?
For example, use it will give us the values of principle read.
And based on these values.
We will conclude our simple interest.
OK, so what we want now is we want our program to start taking input from the user.
OK, so our program was in Dagestan and Jake was fifteen and Gabler's hypoplastic, and then I was sprinting
gey.
OK, so let us first run this program.
So what should be my output?
And plus fifteen Nerdist 25.
So the value of case 25.
So my output should be 25.
OK.
So let's build and then.
OK, so 25 is getting printed and these two lines are also getting printed.
But why these two lines are getting printed.
So basically these two lines tells us that your program has finished its execution.
OK.
OK, so before we learn how to take in perfect loser, I wonder discuss one more thing.
OK, so when we write in time.
So this line is called Declaration.
We declared a variable eye when we arrived and I was 10.
So this line is called.
So this line is called declaration plus initialization.
And when we ride and die.
And then the next line, when we write, I call Spain.
So this line is called declaration.
And this line is called assignment.
We declared a very.
And I sign a valy of 10 to my variable.
I similarly here I declared my variable, I.
And I initialize my variable.
I do then.
OK.
So obviously, let's come back to our equation.
How debate in Britain leaves a.
OK, so now the thing that I want do changes, I want this I n g to be input from the user.
So we will use an inbuilt functionality called Thien.
So we will use an inbuilt functionality guard see in.
Sarin is used to take input from the user.
And just like sealed in is also defined in a file called Ustream, which we have already included in
our called.
OK, so how to print, for example, and take Wilston?
And if I want to print the value of them, what will I do?
I will write C out.
I similarly, if you want the big input, you will write C in I.
Okay.
So this thing is printing the test for the output.
And this thing is for input.
OK.
So let's see.
So in DIKO, Spain, we declared a variable.
And then we will take the video for you from user sit in.
And similarly, after declaring a variable G, we will take the value of G.
And potentially use it.
OK.
So that is all.
OK, so let's compile.
And on it.
OK, so my program is running.
But how do I know that my program is ending?
Basically, those truly four lines are not getting printed.
That means my program is not finished yet.
It is still in the execution.
It is still running.
But then why it isn't showing anything.
Why am I black windows empty.
So basically, what is happening here?
My program reached line number eight.
OK.
So my program reached line number eight and it stops.
It is waiting for me to give input.
OK, so let's hear the value of AI is hundred and then enter.
And what happen now is my program reached line number eleven and it stops again.
It is again waiting for me to give input.
Let's to the value of JS 200.
So virtually my output, I will calculate the value of variable K, which is AI plus G.
That is hundred plus two hundred.
And then I am printing key.
So my output should be 300.
Okay.
So presenter and T Android is getting printed.
Salah Golders.
Hundred percent.
Correct.
Okay, so let's take a few more values and let's try to end it again.
OK, so let's say the value of fire is to and the value of J3, some output should be five and five
is getting printed.
OK, so let's make this file a little bit useful as well.
OK.
So here we will also do the same thing.
We're declaring a variable B and we will take the value of B input from the user.
Similarly, I will declare a variable R and then we will take the vilified and bird from the user.
And same goes for te redeclared variability and take input from the user.
OK, so that is all that we have to do.
So let's end our program.
Again, my program reached line number seven.
And it is waiting for me to give input, led the Valley of Peace.
Thousand then press enter.
Now my program reached a line number 10.
And it is again waiting for me to give input.
Later, the value of fieriest 20 press enter.
And now my program reached line number 13 and it's dropped again.
It is waiting for me to give input and let us see.
The value of time is ten.
And now my program will reach line number 15.
It will calculate simple interest based on the values of principle return time and then it will print
simple interest.
OK, so what will be my output?
OK.
So simple interest equals principle.
That is thousand.
And to read.
Which is to a..
In due time.
Which is ten.
Divided by hundred.
OK, so my simple intestines.
2000 and why output should be 2000.
So let's see press enter and 2000 as my simple interest, which is hundred percent correct.
OK.
So now my programs are much more useful compared to what they were before, because now it doesn't find
simple industrial fixed values.
You can give any way loose and it will find simple industrial you OK?
OK.
So now we know how to take in deejay's input.
So let's see someone examples.
Filey, new empty file file, save file.
And then let's say the name of the file is taking.
And put.
Examples.
Not CBP.
Hashing, glued ISTM.
Using namespace SDD semicolon.
Then I am having in domain.
And then I am having done, too.
OK, so first of all, let's take a floating rate losers input so flawed F declared a variable F and
then seen F and then C out.
You entered.
If and then Lane.
OK, so let us on our program.
OK, so my program is running and it reached land number seven and is waiting for me to give input.
Let's say two point three press enter.
So you enter two point three.
So the value of Mary Will Effie's two point three.
Now, let us take input.
That will be Cindy and then see old.
You entered.
The and then and Lane.
OK, so listen again.
The white program is working fine, and my program reached line number seven and is waiting for me to
give input, led to the medley of very well efforts.
One point five seven enter.
And now my program reached line number eleven and is waiting for me to go and for variable.
The letter the I love the is two point zero four.
And so you enter two point zero four, which is the value of the.
Now, the.
Well, now let us learn how to take a correcto as an input gassy c, n, c, c out.
You entered.
See?
And then airline.
OK, so let's on our program.
So the value of F is two point three value of there is two point vun and let's say my character is capital
L.
Okay, so L is getting printed because the value of variable C is an.
OK, so now we know how to take input from the user.
OK.
So that is all for this.
We do.
Thank you.