Professional Documents
Culture Documents
Create the flowchart and pseudocode that will determine if the voter can vote for barangay election, for
sangguniang kabataan election or not. If the age of the voter is 12 to 17, then he/she can vote for sangguniang
kabataan election. If the age of the voter is 18 and above, then he/she can vote for barangay election. Otherwise
the voter cannot vote. Print out the name of the voter, age and the message “Congratulations, you can vote for
sangguniang kabataan election!” or “Congratulations, you can vote for barangay election!” for those that can
vote and “Sorry, you cannot vote!” for those who cannot vote. (30 points)
GIVEN: None
INPUT: variable A for Age -> A
variable N for Name -> N
REQUIRED:
A=12 to 17 then print “Congratulations, you can vote for sangguniang kabataan election!”
A=18 above then print “Congratulations, you can vote for barangay election!”
A=11 below then print “Sorry, you cannot vote!”
Flowchart
START
Input, A, N
Is A=12
to 17?
Is A=18
above?
Print N, A, “Congratulations,
you can vote for sangguniang
kabataan election!”
Is A=11
Print N, A, “Congratulations, below?
you can vote for barangay
election!”
STOP
This study source was downloaded by 100000834283678 from CourseHero.com on 03-17-2022 00:16:37 GMT -05:00
https://www.coursehero.com/file/97285725/Collaborative-Learning-Exercise-4pdf/
Pseudocode
Begin
Input N, A
If A=12 to 17 then
Print N, A, “Congratulations, you can vote for sangguniang kabataan election!”
Else If A=18 above then
Print N, A, “Congratulations, you can vote for barangay election!”
Else If A= 11 below then
Print N, A, “Sorry, you cannot vote!”
End
This study source was downloaded by 100000834283678 from CourseHero.com on 03-17-2022 00:16:37 GMT -05:00
https://www.coursehero.com/file/97285725/Collaborative-Learning-Exercise-4pdf/
Powered by TCPDF (www.tcpdf.org)