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?
6 ответов
+ 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
+ 1
https://code.sololearn.com/caWjqkjcA35q/?ref=app
Viki check this program
+ 1
Wlcm bro😊😊
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
0
https://www.programiz.com/c-programming/bitwise-operators
Use this link to know about ^(xor) operator
0
Tq buddy.This works fine