170k views
3 votes
The county clerk's office is writing a program to search their database for citizen records based on information about that citizen such as first name, last name, age, etc. Given below is a segment of pseudocode that should find the record of every citizen over the age of 50 in the county. The code makes use of the functions GetAgeOf and GetNameOf, which are used to retrieve the age and name of a citizen from a record which is inputted.

1 Answer

7 votes

Answer:

The correct pseudocode to find the records of all citizens over the age of 50 is IF(age > 50).

OR EACH item IN citzlist

{

WHILE(not end of citzlist)

{

IF(age > 50)

{

DISPLAY(name)

}

}

}

If this is run, it will bring out all the names of the citizen who are over the age of 50 in the list.

Step-by-step explanation:

User Kiechlus
by
5.5k points