Start
Declare variable numberNames as integer
Declare variable lastName as String
Declare variable firstName as String
Read numberNames
Create array names[]
for i = 0 to numberNames step i=i+1
Read the firstName
Read the lastName
Add lastName and firstName to the array names
sort array names by lastName
Display the names in ascending order.
Stop
Comments
Leave a comment