0

```
//Hi all ,can you explain why does this functon has two returns?
//How to read them? Is it like if/else?
int _tmain(int argc, _TCHAR* argv[])
{
int x, n;
int res;
int power(int, int);
cout << "Enter a number:";
cin >> x;
cout << "Enter a power:";
cin >> n;
res = power(x, n);
cout << "X^N is:" << res << endl;
return 0;
}
int power(int x, int n)
{
if (n == 0)
return 1;
if (n % 2 == 0)
return power(x*x, n / 2);
return power(x*x, n / 2)*x;
}
```