Hey, guys, welcome back to the Close.
So in this session, we will solve one interesting problem.
So our problem is given and given and we have to print Bourdon, for example, if any, equals five.
My president will look something like this.
OK, so we're given and we have to print Paddon, for example, of the value of N is to my burden will
be.
This similarly, the value of honesty.
My pattern will be something like this.
So we have all this all this problem and flowcharts and pseudocode.
So we will solve this problem very quickly.
So you can see here the value of phase one, the value of phase two, the value of ice t, the value
of ice for the value of phase five.
So first of all, we need a loop and this loop will then end times.
So we need a loop to run and times.
So I equals one while I less than Noriko's to N and I bless.
Bless.
So why, why.
We need a loop that ran and times.
Because we have to print Androes.
So for N equals five I am printing faithful's.
So this loop will run and times and each time what I will do I will write the logic for printing Wendle.
What I should say for printing.
I Yertle Logic for printing.
I get it all.
And what is the logic for printing.
I throw the value of AI is three.
I will print three stars and only if I use four I am printing four stars and so on.
So logic is very simple.
I need a loop and this loop children eight times and each time this loop is running I will print a.
So let's say I am taking a variable count to count equals one vile count as less than an hour equals
two.
I because we have to run the loop eight times and count plus plus.
So this loop will run eight times and each time this loop is running.
What I'm going to do, I will simply print.
I start.
So this is all that we have to do.
So let us compile all this.
So what we will do.
Well, look, outer loop for printing Androes so vile vilely, I use less than articles to n and here
I plus plus.
So this outer loops for branding Androes now inner look for printing a year through.
Okay, so end.
Count equals one.
While.
Ground is less than articles to a.
Count plus plus.
Now this inner loop will run eight times, and each time this loop is running, I will print.
I started to see out start and after printing when the entire room.
I have to go to next to sushi out and line.
So this is the computer code that we have to write.
Okay, so let's write it.
So that doesn't name this file as.
Start by then.
Start Petmin, not CBB.
So what do we have to do?
I will take an input from the user.
Now I need a loop and this loop should run eight times and times.
So in cycles, one wild I is less than or equal to an.
A plus plus.
So this loop is going to run and times.
And inside this loop, I am writing the logic for printing I yet through and the logic is very simple.
We have to print Istar.
So this loop will run a number of times.
So called less than articles to a hand count.
Plus.
Now what don't want to do is I will print start here.
So see out.
We have to print stars.
And after printing one and Baduel I have to go do next to you for going to next plane.
I will write C out and learn.
So this is the complete logic.
So let us right now.
Let us test our program.
Led to the really off and his five some outproduce, correct?
Let's say the value of an is.
Fifteen.
So now Edward is correct.
So this is it for this video.
If you have any doubt, feel free to ask.
OK.
Thank you.