You also may use select case operator
On Sat, Dec 26, 2009 at 12:57 PM, Anup Joshi <[email protected]> wrote: > > > Hello friends, > I wanted to find biggest number of given two numbers without using the > loop statement, the if-conditional, or the ternary operator ?:. One way > i could do this was with the following code: > > int biggest(int a, int b) { > int result; > > (a<b) && (result = b); // b is bigger > (a>b) && (result =a); // a is bigger > (a==b) && (result = a) // both are equal > > return result; > } > > this code works for positive as well as negative ints. > i wanted to know if there was any other way to find the biggest number > of the two, by using any other c operator or snippet. > > Thanks & Regards :-) > > anup > > [Non-text portions of this message have been removed] ------------------------------------ To unsubscribe, send a blank message to <mailto:[email protected]>.Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/c-prog/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/c-prog/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
