How Do I:compering without using any type of condition
Can I compere among three strings and find the greater among them and if there are indentical strings without using any kind of condition?and how can I do this?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Apr 20, 2010, 2:24 PM
What function does "output of the function is 0,1 or -1" describe? Is that a function that has already been written that you need to use or is it a function you need to write or something else?
safaaPosted Apr 20, 2010, 11:49 AM
if I use the compere I need condition to determind wether the output of the function is 0,1 or -1 and I want to compere without any condition in my program
thanks
SAFFY
Amit ChoudharyPosted Apr 19, 2010, 11:02 PM
what is the meaning of greater here... is it related to string length or Dictionary order.
if it is length then you can calculate the length and use the to get the greatest other wise use CompareTo function to compare the strings according to dictionary order and it'll return you 1 if greater, -1 if smaller and 0 if equals.... use these values and find your greatest string.
Please mark as answer if it helps.