0

Is thr a way to solve this problem?

Input 64 Output True,the given number is a result of the following powers and bases 2 pow 6,4 pow 3,8 pow 2 Input 22 Output: False How to find all the powers and base of the given number?is their a way?can anyone suggest me an efficient way of doing this?

14th Jul 2019, 6:25 AM
viki
viki - avatar
6 odpowiedzi
+ 1
I know Abt pow(x,y) function.My quest is if a num like 64 is given I want to generate all it's power which gives 64 as the resultant answer like 2 pow 6,4 pow 3,8 pow 2 where these bases with their respective power will give 64 as a result Ujjawal Dubey I just want to generate 2 pow 6,4 pow 3,8 pow 2 as the output of 64
14th Jul 2019, 8:31 AM
viki
viki - avatar
14th Jul 2019, 9:01 AM
Ujjawal Dubey
Ujjawal Dubey - avatar
+ 1
Wlcm bro😊😊
14th Jul 2019, 9:27 AM
Ujjawal Dubey
Ujjawal Dubey - avatar
0
Viki use pow(x, y) function in c++. To use this function you need to include math.h header file. Or you can also create your own power function
14th Jul 2019, 7:03 AM
Ujjawal Dubey
Ujjawal Dubey - avatar
0
https://www.programiz.com/c-programming/bitwise-operators Use this link to know about ^(xor) operator
14th Jul 2019, 7:08 AM
Ujjawal Dubey
Ujjawal Dubey - avatar
0
Tq buddy.This works fine
14th Jul 2019, 9:25 AM
viki
viki - avatar