I'm asked to prompt the user for 2 integers, a and b. Determine if a is some power of b and output that claim. I cannot find a way to set that condition up though. I thought of logs, but I don't understand their applications in C++
int main()
{
int a = 0;
int b = 0;
do{
cout << "Input 2 Integers, a and b respectively." << endl;
cin >> a >> b;
if (a < 0 || b < 0)
{
cout << " Invalid Input" << endl;
}
elseif (????)
{
cout << a << " is a power of " << b << endl;
}
else
cout << " No Match Found." << endl;
} while( a < 0|| b < 0);
}