I want to find the big number. But after compile, it showing b value. But c is the big number of all those.
a= 21
b=22
c= 23
if a>(b&c):
    print(a)
elif b>(c&a):
    print(b)
else :
    print(c)
I want to find the big number. But after compile, it showing b value. But c is the big number of all those.
a= 21
b=22
c= 23
if a>(b&c):
    print(a)
elif b>(c&a):
    print(b)
else :
    print(c)
 
    
    What you really want is just max(a, b, c)
 
    
    You have to use logical "and" instead of bit wise &. You can use like below using logical and operator.
a= 21
b=22 
c= 23 
if (a>b) and (a>c):
   print(a) 
elif (b>c) and (b>a): 
   print(b) 
else: 
   print(c)
