Skip to player
Skip to main content
Skip to footer
Search
Connect
Watch fullscreen
Like
Comments
Bookmark
Share
Add to Playlist
Report
Learn Programming Technique C to Master Skills - Continuous If Program (Flow Chart)
Tutorials Arena
Follow
10/8/2024
Category
š
Learning
Transcript
Display full video transcript
00:00
Hello everyone, this is Sandeep. Today I am going to start Continuously Statement program.
00:08
In Continuously Statement, we have to take decision continuously. So this is the program.
00:18
Bank introduce incentive policy of giving bonus to all its account holders irrespective
00:25
of their balances. If the account holder balance is greater than equals to 10,000 and
00:33
account holder is male, then in that case, account holder will get 5% bonus on the account
00:41
which he is having in his account. If the balance amount is greater than equals to 10,000
00:51
but the account holder is female, in that case, the bank policy is to give 10% bonus
01:01
on whatever the account she is having in its account. And if the balance amount is less
01:08
than 10,000, either the account holder is male or account holder is female, bank is
01:18
not going to give any bonus. So you have to calculate the bonus and the total balance
01:23
and then you have to display. For total balance, the variable is for tb, for the amount which
01:29
the account holder will having in its account, for that is a. For gender, we have taken g
01:39
and for bonus b. So when I input the amount and the gender, it is going to check both
01:47
the things, the amount which the account holder is having and the gender. If both the
01:53
condition is true, then according to question 5%, if gender is not male, it will come to
02:00
the no part and it is going to check if it is female. Then if it is female, according
02:05
to question 10% bonus, going to calculate and then total balance is going to calculate
02:12
and then going to display. Let us do the try run and understand. Suppose the amount
02:20
which the account holder is having that is 20,000 and the gender is male, for male is
02:29
the code m. So here if 20,000 greater than 10,000 years, the condition is true, it will
02:35
come to the yes part. Inside g, it is m, m equal to m. Inside the g variable, the value
02:44
is what m. So m is compared with the constant m. Yes, the condition is true. Both the conditions
02:50
are true. So in that case, according to question 5% bonus calculated, total amount is calculated.
03:00
So the bonus is first calculated. So the bonus amount is 1,000 and then total amount
03:06
will be 20,000 plus 1,000 that is 21,000. Let us run one more time the program. If the
03:16
amount is 20,000 but the gender is f. So here the condition is true, but here the conditional
03:24
get false. As inside g, it is f, f equal to m. Here the condition is false, it will
03:32
come to the no part. If what is inside g, it is f, f equal to f. Yes, here the condition
03:38
is true. So the gender is female. In that case, bank is going to give 10% bonus. So
03:47
on amount, the 10% bonus is calculated. That is 20,000 plus 2,000 that will be the total
03:59
balance. That is 22,000. Both the things going to display the total balance and the bonus
04:06
and then stop. Let us run one more time. Suppose the amount is 20,000 but we have input a wrong
04:16
gender, suppose k. So here the condition is true, 20,000 greater than 10,000, but here
04:22
the conditional get false, k equal to m and it will come to no part. If k equal to f,
04:29
here also the conditional will get false, it will come to the no part and what it is
04:34
going to display? Wrong gender. We have input the wrong gender. They are only what m and
04:38
f, male and female. For male, it is m and for female what f, but here we have input
04:45
wrong gender. In that case, it is going to display wrong gender and then stop.
04:51
One more time, we will run it. Suppose the amount is 5,000 in the account and the gender is what
04:59
male. So at the initial state, the conditional will get false as inside a it is 5,000 greater
05:05
than 10,000, the condition false. It will come to the no part and according to the question,
05:12
no bonus. So it is going to display what? No bonus and then stop.
05:16
So with the help of flowchart, I hope you understand how to apply the
05:20
continuous if. In the next video, I am going to implement the same program in C. Thank you.
Recommended
4:54
|
Up next
Learn Programming Technique C to Master Skills - Single If Statement Program (Flow Chart)
Tutorials Arena
10/12/2024
2:58
Learn Programming Technique C to Master Skills - Nested If Statement Program (Flow Chart)
Tutorials Arena
10/12/2024
4:57
Learn Programming Technique C to Master Skills - Loop With If Statement Program ( Flow Chart )
Tutorials Arena
10/13/2024
3:52
Learn Programming Technique C to Master Skills - Second Program of Loop (Flow Chart)
Tutorials Arena
10/17/2024
12:06
Learn Programming Technique C to Master Skills - Continuous If Statement Program
Tutorials Arena
10/8/2024
3:51
Learn Programming Technique C to Master Skills - First Program of Loop (Flowchart)
Tutorials Arena
10/13/2024
3:20
Learn Programming Technique C to Master Skills - Multiple Selection Program (Flow chart)
Tutorials Arena
10/12/2024
3:27
Learn Programming Technique C to Master Skills - Third Program of Loop ( Flow Chart)
Tutorials Arena
10/17/2024
4:39
Learn Programming Technique C to Master Skills - If... else if Statement Program (Flowchart)
Tutorials Arena
10/8/2024
4:01
Learn Programming Technique C to Master Skills - Fourth Program of Loop ( Flow Chart )
Tutorials Arena
10/13/2024
4:55
Learn Programming Technique C to Master SkillsCharacter String Second Program (Flowchart)
Tutorials Arena
11/19/2024
5:15
Learn Programming Technique C to Master SkillsCharacter String Third Program (Flowchart)
Tutorials Arena
11/19/2024
7:56
Learn Programming Technique C to Master Skills - Nested If Statement Program
Tutorials Arena
10/12/2024
3:16
Learn Programming Technique C to MasterĀ Skills - First Program of Function ( Continue ...)
Tutorials Arena
11/3/2024
3:28
Learn Programming Technique C to Master Skills - Switch Case Program ( Continue ...)
Tutorials Arena
10/19/2024
5:02
Learn Programming Technique C to Master SkillsCharacter String Fourth Program (Flowchart)
Tutorials Arena
11/19/2024
10:56
Learn Programming Technique C to Master Skills - Loop With If Statement Program
Tutorials Arena
10/13/2024
9:20
Learn Programming Technique C to Master Skills - Union Program
Tutorials Arena
11/10/2024
9:09
Learn Programming Technique C to Master Skills - Second Program( Call by Reference)
Tutorials Arena
11/8/2024
6:03
Learn Programming Technique C to Master Skills - Linked List ( Second Program)
Tutorials Arena
11/30/2024
16:34
Learn Programming Technique C to Master Skills - FIle Handling ( Explain of Program with help of Diagram)
Tutorials Arena
11/18/2024
4:54
Learn Programming Technique C to Master SkillsCharacter String Fifth Program ( Flowchart)
Tutorials Arena
11/19/2024
5:14
Learn Programming Technique C to Master Skills - Single If Statement Program Explanation
Tutorials Arena
10/12/2024
4:17
Learn Programming Technique C to Master Skills - Linked List ( Create Node Program)
Tutorials Arena
11/30/2024
12:25
Learn Programming Technique C to Master Skills - Call By Reference Program
Tutorials Arena
11/8/2024