Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- int luythua(int a, int b) {
- if (b == 1) {
- return a;
- }
- else {
- return a*luythua(a, b - 1);
- }
- }
- void main(){
- int a, b;
- cout << " nhap a , b: ";
- cin >> a >> b;
- cout <<luythua(a, b);
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement