Logo 
Search:

C Programming Article

Submit Article
Comments on To check largest among two numbers without using if statement
Category: C Programming (Beginners)    Author: Muhammed Athil

Is it possible to check largest among two numbers without using if statement.... Yes... it is possible. See the program how its works


Muhammed Athil
Muhammed Athil from IndiaApr 06
it is Done by using Conditional operator (?:)
Some example:
average = (n > 0) ? sum / n : 0;
e1 ? e2 : e3;


Please enter your Comment
  • Comment should be atleast 15 Characters.
  • Please put code inside [Code] your code [/Code].