We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Bitwise Operators
Bitwise Operators
Sort by
recency
|
543 Discussions
|
Please Login in order to post a comment
‵‵‵c void calculate_the_maximum(int n, int k) { //Write your code here. int maxAnd = 0, maxOr = 0, maxXor = 0;
}
my code
On running the code, it gives strange error, while in my local compiler, it works fine.
Salutes from Mexico :3 !
include
include
include
include
//Complete the following function.
void calculate_the_maximum(int n, int k) { //Write your code here. int m = 0; int m1[2] ={0}, m2[2] = {0}, m3[2]= {0};
for (int i = 1; i <= n; i++) { for (int j = i + 1; j <= n ; j++) {
} printf("%i\n",m1[1]); printf("%i\n",m2[1]); printf("%i\n",m3[1]);
}
int main() { int n, k;
}
int maximum_and = 0, maximum_or = 0, maximum_xor = 0, and = 0 , or = 0 , xor = 0; for (int i = 1 ; i <= n ; i++) { for (int j = i+1 ; j<= n; j++) {
} printf("%d\n%d\n%d",maximum_and,maximum_or,maximum_xor);