相关疑难解决方法(0)

^运算符在Java中做了什么?

请问有什么功能^(尖)运算的Java服务?

当我尝试这个:

int a = 5^n;
Run Code Online (Sandbox Code Playgroud)

......它给了我:

对于n = 5,
对于n = 4 返回0 ,
对于n = 6 返回1 ,返回3

...所以我猜它不会执行取幂.但那又是什么呢?

java operators exponentiation

276
推荐指数
13
解决办法
40万
查看次数

^ 运算符的用途是什么?

运算符是^用来做什么的?它不适用于幂函数:

#include <iostream>

int main(){
    int x, y;

    cout << (x^y) << endl; /* this is the unkown (X^Y)*/

    return 0;
}
Run Code Online (Sandbox Code Playgroud)

c++ operators xor

-4
推荐指数
1
解决办法
1万
查看次数

标签 统计

operators ×2

c++ ×1

exponentiation ×1

java ×1

xor ×1