VIII Flowchart and Algorithms
VIII Flowchart and Algorithms
Start
Input A, B
Y
Is A=B? Display They are equal."/
Stop
he/she is
2. Accept the age of a person and check whether
eligible to vote or not. A person is eligible to vote only when
he/she is 18 years or more.
Ans. Algorithm:
Step 1: Start
Step 2: Accept the age of a person (say, Age).
Step 3: If Age is greater or equal to 18 years then display
'Eligible to vote'.
eligible
Step 4: If Age is less than 18 years then display 'Not
to vote.
Step 5: Stop
Flowchart:
Start
Input Age
Stop
Start
Y
ls A²+B-c?? Display "Pythagorean Triplet"
Stop
runs; R1
Enterprevious
Y R1=R1+CR
Is R2=-1?
N Display R1, CR
CR=CR+R2
Any more
player to batt?
Stop
Accept anumber as N
Is N divisible Yes
Display "Number is
by 2 and 5? divisible by 2 and 5
No
No
Stop
triangle
3. Input three angles of a triangle and check whether a
it is an
is possible or not. If possible, then check whether
'Acute-angled Triangle', 'Obtuse-angled Triangle' or a 'Right
angled Triangle'.