Hello, guys.
Welcome back to the calls.
So I felt that the last blast was a little bit boring as we only discussed tutee materials.
Glass is going to be interesting.
So today we'll learn more about flowchart and we'll solve a few problem.
So we've already discussed in beef about flowchart in the last lesson.
We will continue from that.
OK, so what is a flowchart?
So I have told you that it is a diagrammatic or you can see a pictorial representation of the steps
that V for Lord to solve a problem.
And we show these steps and boxes of various shapes.
OK.
So let us discuss about components of a flowchart.
So if we have Overlordship, so it represent initialised or a Terminator example start, then we have
belowground shape.
So it represent input and output, input or output.
For example, read.
And then we have a rectangle shape and represent process.
An example led I equals one.
Then we have Diemen Chip represent a condition.
You can see our decision.
Let's talk about example is a good.
Then do.
Then we have arrows.
And then we have connectors, so why are connectors used, for example, your flowchart is very big
and it is not fitting in a single page.
So with the help of Connectors, we can continue our flowchart from the next page.
So I have a question for you.
The question is, processa is running in both these cases, whether you are taking input or are giving
output, audio output in something processor run in both these cases.
So why I am having the friendship.
The answer is very simple.
This is known as reading process.
We're doing process and this is known as active process.
So in the vetting process, if the user is not getting their input, you can't proceed ahead.
So in other words, we can say it depends upon use.
It depends on user.
And it doesn't depend on user.
So that's why we have the friendship.
OK, great.
So that was all theory about flowchart.
Now we will solve your problems to get a better understanding of flowchart.
So problem number one, I read Principal I.
Time and Brent, simple interest.
We have to draw the flowchart for the same.
OK, so let us draw the flowchart.
So I will start by flowchart.
Then I have to read three numbers B, R and D, principle rate and time.
So read principal rate and time, B, R and D are variables in which I will store the value of principal
rate and time given by user.
Then I have to calculate the simple interest, which is it goes to B multiply are multiplied by D or
divided by a hundred.
Essay is also a variable which will store the value of simple interest.
Then we have to print simple interest.
So we have printed the simple interest.
Our work is over.
Now we will end our program.
So and so.
This will be the flowchart.
So let us advise what we have done.
So the question asked us to read, principal read and time and print simple interest.
So we start our program.
Then we read two numbers.
Principal rate and time.
B, R and D are three variables which will store the value of principal date and time given by user.
Then calculating why simple interest using this formula, then printing my simple interest.
Now, at this point of time, my work is over.
So I'm ending my flowchart.
Okay.
So let us all.
And the problem.
So problem number two.
So the question is, I have to read a five.
No, I read five.
No.
And printed their average print, their average.
So I have to draw the flowchart for the same.
OK.
So what will I do?
First of all, I will change the color of my pen.
And then I will start my program.
OK.
So I have to read five numbers.
OK, read A, B, C, D, a..
Let ABC these are my five numbers.
At ABC.
ABC, the other variables that will store the value of five numbers.
Then I will calculate my average using the formula.
A plan B plus C plus D plus E and whole divided by five.
So I have calculated my average.
Now it's time to print the average print average.
So at this point of time, my work goes over.
Now I will.
My flowchart.
So let us revise what we have done.
So the question was we have to read a five number.
And we have to print the average.
So I start my program.
I read five numbers.
ABC, the E!
And then I calculated my average averages.
Also variable here that is storing the value of average than printing average.
Then I'm ending way program.
Okay, great.
So let us discuss the last probably of this lesson.
So problem number three.
So the problem statement is we have to print largest off three numbers given by user.
So let us know that flowchart.
So I will start my flow chart.
Then I have to read the tea numbers.
Let ABC be the tea.
No lead A, B and C..
OK.
So first time checking.
Is eager to then be and eager to Danzy.
So there are two cases, either this condition will be true or this condition will be false.
If this condition is true, that means is the largest number.
OK.
So I will brentley.
Brent A.
Now, the second situation can be this condition is false.
That means it is not the largest number.
Will check for B is bigger than A.
And bigger than see again.
There are two cases in this conditional withdrawal or this condition will be false.
If this condition is true, that means B is the largest number.
So I will print to be.
And the second situation can be this condition is false.
That means B is not the largest number.
So at this point of time is not the largest number.
B is not the largest number.
That means C is the largest number.
OK, so make Pentagram shape because we are printing.
OK.
So it is not the largest number being not the largest number, and that means seas, the largest number.
So we have done what the question asks us to do now.
And our program.
So.
And.
Similarly, after printing, we we have to end our program.
And similarly, after printing.
We have to end our program.
So let us revise what we have done.
So the question was, we have to bring the largest of three numbers.
So I start my program item three, number A, B and C word that ABC, ABC are three variables that will
store the value of T number.
Okay.
So first time checking.
So first of all, I check is eager then B, if this condition is true then it means ethologist numbers.
I am printing.
And then I'm ending my program.
If this is not true, that means it is not.
The largest number that I am checking for me is B the largest number in this condition will be true
or this condition will be false.
If this condition is true, I am printing B and ending my program.
Whatever the condition is false.
If this condition is false, I will only reach here if it is not the largest number.
B is not the largest.
Just no automatically means.
C is the largest number.
So I am printing C and then I'm ending my program.
So we solve three problems truly.
If you have any doubt, you can ask me that you in this section in the next class.
We will continue flowchart and learn new concept with the help of your problems.
I hope you enjoyed this story.
I will see you in the next material.
I will then enjoy C++.
Thanks for watching.