Compare two strings

I'm supposed to write a program to take two strings input and then to compare them to see which one is alphabetically larger.

What sort of comparison should be done in this case? And how to find the alphabetically larger string ? any idea or tips would be highly appreciated.
oops sorry
Last edited on
Thanks for the reply. since its supposed to compare alphabetically, if we enter letter a and b, isn't b supposed to be larger than a?
So you need to get the individual values of each letter, combine them to get the alphabetical "size" of the string, and find which one is larger? Cast each character in the strings to integers to get the ASCII value, add them all up, and compare. Simple as that.
"alphabetically larger"?

I like packpirate's solution... if that's what is wanted.
Thanks packetpirate, that solved the problem
Topic archived. No new replies allowed.