0
How i write a^b
5 Réponses
+ 7
Using power function :)
pow(a,b)
where a is base and b is its power
+ 6
It depends, the ^ symbol is the bitwise XOR operator, if you want to XOR a and b then you simply do as you just did. But if you mean to raise a to the power of b, then, as suggested earlier by Abhijeet Srivastava, use pow() function; and don't forget to include <cmath> header : )
+ 5
The power of a number is the result of the multiplication of this number by itself a certain number of times according to the exponent.
For example :
4^4 = 4 × 4 × 4 × 4 = 256
10^-5 = 10 ÷ 10 ÷ 10 ÷ 10 ÷ 10 = 0.001
+ 2
pow(a,b)
a is a number and b is it's power.
+ 1
thx