torturedmind
Programmer
what's wrong with this simple code? the answer is always the base (16) when it should be 4.
am a newbie in c++. thanks in advance for any help you'll all extend.
kilroy
philippines
"Once a king, always a king. But being a knight is more than enough."
Code:
int main()
{
int iBaseNum = 16, iRootNum = 2;
float fAnyAnswer = 0.0f;
fAnyAnswer = iBaseNum^(1/iRootNum);
cout << fAnyAnswer;
return 0;
}
am a newbie in c++. thanks in advance for any help you'll all extend.
kilroy
philippines
"Once a king, always a king. But being a knight is more than enough."