I cannot get the out put to be put in alphabetical order and im not sure what im doing wrong.
here is the problem they want
Write a program that reads two names (name1, name2)
And then prints them in alphabetical order.
If the names are the same, print a message indicating that the names are the same.
Hint: use the strcmp() function to compare the names.
strcmp() returns 0 if the strings are the same.
strcmp() returns a negative number if the first string is less than the second string.
strcmp() returns a positive number if the first string is greater than the second string.
Example:
Enter name 1: John
Enter name 2: John
John and John are the same.
Enter name 1: John
Enter name 2: Mary
John and Mary.
Enter name 1: Mary
Enter name 2: John
John and Mary.