Discussion Forums

New User? Please read instructions!

C program to compare 2 numbers without if statement  

  RSS

thiyagarajan.s
Active Member
Joined: 5 months  ago
Posts: 14
27/01/2017 10:02 am  

C program to compare 2 numbers without if statement


ReplyQuote
admin
Eminent Member
Joined: 5 years  ago
Posts: 26
10/02/2017 10:26 am  

C program to compare 2 numbers without if statement

 

#include <stdio.h>

int main()

{

        int x=15, y=4 ;

        y = ( x>y ? printf("x is greater than y") : printf("y is greater than x") ) ;

}

 

Output:

x is greater than y


ReplyQuote
  
Working

Please Login or Register

Ask your questions or clarify your/others doubts from,

✅ Online Discussion Forums by Fresh2Refresh.com





Share this website !!!
Facebook Twitter Linkedin

Close
We Support JALLIKATTU !!!
We Support JALLIKATTU!
By Fresh2Refresh.com
Show Your Support as well. Thanks!