Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Program to find largest of three numbers without using comparsion operator?

    ct=0;
    while(var1 && var2 && var3){
    var1++;
    var2++;
    var3++;
    ct--;
    }
    printf("%d",ct);

    could u pls explain this

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    103
    Thanks
    0
    Thanked 14 Times in 14 Posts
    check

    a>b?a>c?a:c:b>c?b:c;


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •