You are viewing a single comment's thread. Return to all comments →
void calculate_the_maximum(int n, int k) { int a, b, c, max1=0, max2=0, max3=0; for(int i=1; i a=i & j; b=i | j; c=i ^ j; if(amax1) max1=a; if(bmax2) max2=b; if(cmax3) max3=c; } } printf("%d\n%d\n%d", max1, max2, max3); }
Seems like cookies are disabled on this browser, please enable them to open this website
Bitwise Operators
You are viewing a single comment's thread. Return to all comments →
void calculate_the_maximum(int n, int k) { int a, b, c, max1=0, max2=0, max3=0; for(int i=1; i a=i & j; b=i | j; c=i ^ j; if(amax1) max1=a;
if(bmax2) max2=b;
if(cmax3) max3=c;
} } printf("%d\n%d\n%d", max1, max2, max3); }