Is this the source?
Task 3: Name order (harder)
Strings of characters can be compared alphabetically using boolean operators in exactly the same way as numbers are compared. For example, the following pseudocode instructions would display the names in alphabetical order:
if Name1 < Name2
then output Name1, Name2
else output Name2, Name1
Write a program that asks for three names and then uses nested IF statements to display them in alphabetical order.
Note 1: You will need to test your program very thoroughly. There are six different ways of arranging any three given names. Your testing should cover all six.
Note 2: You will get unexpected results if you do not use capital letters consistently. This is because of the way that characters are stored using character codes and is explained fully in Section 5.2.
30 Replies - 1150 Views - Last Post: 17 November 2013 - 09:18 AM