On 12/28/2009 11:36 PM, John wrote:
>
> --- In [email protected] <mailto:c-prog%40yahoogroups.com>, Rani 
> Jain <jain.r...@...> wrote:
> >
> > int biggest(int a, int b) {
> > int result;
> > (a<b)?(result=b):(result=a);
> > return result;
> > }
>
> which can be simplified to:
>
> int biggest(int a, int b) {
> return (b > a) ? b : a;
> }
>
> but it uses the ternary operator, which the OP said was not allowed.
>
yeh ternary operator, if, and loop is not to be used. btw it is only an 
attempt to explore different possibilities through which we can make 
decisions in our c programs. :-)

Regards

anup


[Non-text portions of this message have been removed]

Reply via email to