| 12 | } |
| 13 | |
| 14 | int main1() |
| 15 | { |
| 16 | cout << "\t\t\t***Program to calculate the x^y using recursion***" << endl; |
| 17 | int x, y; |
| 18 | cout << "Please enter the numbers x^y: "; |
| 19 | cin >> x >> y; // inpuing the interval of the numbers |
| 20 | cout << "Result: " << power(x, y); // calling function 'power' |
| 21 | cout << endl; |
| 22 | system("pause"); |
| 23 | return 0; |
| 24 | } |