Conditional Operator

This is a discussion on Conditional Operator within the C Programming forums, part of the General Programming Boards category; If we want to differentiate 3 numbers provided by user to show which is maximum and which is minimum.What will ...

  1. #1
    Registered User
    Join Date
    Dec 2011
    Location
    Rawalpindi, Pakistan, Pakistan
    Posts
    12

    Conditional Operator

    If we want to differentiate 3 numbers provided by user to show which is maximum and which is minimum.What will be our c program statement???

  2. #2
    Registered User joybanerjee39's Avatar
    Join Date
    Oct 2011
    Location
    kolkata
    Posts
    107
    Quote Originally Posted by Waqas Asad View Post
    If we want to differentiate 3 numbers provided by user to show which is maximum and which is minimum.What will be our c program statement???
    what do you think it will be?

  3. #3
    Registered User
    Join Date
    Oct 2011
    Posts
    23
    Read about the conditional operator here:
    Dystopian Code: The Conditional Operator

  4. #4
    Registered User
    Join Date
    Nov 2011
    Location
    Douala, Cameroon
    Posts
    187

    Cool i think this may solve this problem

    guys check out the logic in this code.


    Code:
    return  if (is_true) ? a: b;
    
    return c:

  5. #5
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,716
    Quote Originally Posted by Nyah Check
    guys check out the logic in this code.
    Looks like a syntax error or two to me.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. conditional operator
    By nasser in forum C Programming
    Replies: 2
    Last Post: 10-23-2011, 07:18 PM
  2. Conditional Operator
    By markcocoa10 in forum C Programming
    Replies: 7
    Last Post: 10-15-2010, 06:22 PM
  3. conditional operator, 3 conditions
    By EffecTed in forum C Programming
    Replies: 4
    Last Post: 04-02-2010, 11:57 AM
  4. Conditional Operator
    By arjunajay in forum C Programming
    Replies: 8
    Last Post: 07-10-2008, 08:17 AM
  5. Conditional operator ? :)
    By ER in forum C++ Programming
    Replies: 4
    Last Post: 11-29-2001, 02:34 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21