...

View Full Version : Program to find largest of three numbers without using comparsion operator?



arunslb123
10-22-2011, 05:38 AM
ct=0;
while(var1 && var2 && var3){
var1++;
var2++;
var3++;
ct--;
}
printf("%d",ct);

could u pls explain this

jassi.singh
10-22-2011, 09:59 AM
check

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum