Asked by Janeille

Develop an algorithm or write pseudocode to determine if a citizen is eligible to vote. The
criteria for eligibility are that the citizen must be 18 or older and must not be a convicted
felon. The algorithm must continuously accept as input only the names, year of birth and
felony status of a citizen. The algorithm should continue to accept this information until a
year of 0 (zero) is input.
Print the name of the citizen and a statement saying whether or not the citizen is eligible to
vote.

Answers

Answered by Ms. Sue
I'm sorry I can't help you with the pseudocode, but in many states convicted felons can vote if they've already served their prison sentence.

Answered by Janeille
ok thank you.
Answered by Janeille
if i develop one can you be able to look it over?
Answered by Ms. Sue
I'm computer illiterate. <g>

But after you develop a code, post it along with your instructions as a new question. Someone may be able to help you then.


Answered by Janeille
lol ok then thnks.
Answered by Janeille
Develop an algorithm or write pseudocode to determine if a citizen is eligible to vote. The
criteria for eligibility are that the citizen must be 18 or older and must not be a convicted
felon. The algorithm must continuously accept as input only the names, year of birth and
felony status of a citizen. The algorithm should continue to accept this information until a
year of 0 (zero) is input.


THIS IS THE CODE.

GET name
GET yob
GET status
age = 2010 - yob
status = "felon" THEN
WRITE age <= "18" THEN
Felonystatus = "is a felon"
ELSE
Felonystatus = "not a felon"

PRINT name, yob, felonystatus
Answered by Anonymous
You code doesn't loop, so only 12 name can be input.


DO WHILE .T.
GET name
GET yob
IF yob = 0 THEN
EXIT DO
ENDIF
GET status
age = YEAR() - yob
IF age >= 18 AND status != "FELON"
PRINT name + " is elligible to vote"
ELSE
PRINT name + " is not elligible to vote."
ENDIF
ENDDO

Answered by Janeille
I don't understan what you saying.
Answered by Janeille
And that code does'nt compile.
Answered by Clinton Rono
Start
Input age;
if age >= 18
Print Eligible;
Else
Print Not Eligible;
Stop
Answered by CHRISANDRA
Program eligibility_to_voters;

var
name:string;
DOB:integer;
Status:string;
cy:integer;
age:integer


Begin

cy=2019

writeln ('Enter name');
readln;
readln (name);

Writeln ('ENTER DOB');
readln;
Readln (DOB);

Writeln ('Enter status');
readln;
Readln (status);
readln;
age:=cy-DOB;

while year <> '0' do;


If age >18 status=no;

THEN

Print:"can vote"


ELSE

Print:"cannot vote"

Endif;

readln;




end.
Answered by CHRISANDRA
What am I doing wrong?
Answered by Sam
Using pseudocode or a flowchart, develop the logic for a program that accepts a number as input and displays the value that is 10 more than the number.
Answered by Sam
Using pseudocode, develop the logic for a program that accepts three numbers as input and find the average of the numbers

Related Questions