You are viewing a single comment's thread. Return to all comments →
void calculate_the_maximum(int n, int k) { int i=0,j=0,y,m,x, m1=0,y1=0,x1=0;
for( i=1;i<=k;i++) { for (j=i+1;j<=n;j++) { m = i&j; y = i|j; x = i^j; if (m<k) { if(m1<m) { m1 = m; } } if (y<k) { if(y1<y) { y1 = y; } } if (x<k) { if(x1<x) { x1 = x; } } } } printf("%d\n%d\n%d\n", m1,y1,x1);
}
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 i=0,j=0,y,m,x, m1=0,y1=0,x1=0;
}