# data[].attributes.body
int kuasa (int, int); main() { int x, int y, nilai; cin>> x; cin>> y; nilai=kuasa(x,y) } int kuasa (int x, int y) { if (y==0) return 1; else if(y==1); return x; else return*kuasa(x,y-1) }

# data[].attributes.body
#include <iostream>

int kuasa(x,y) main() { int x,y, nilai; cin>>x; cin>>y; nilai=kuasa(x,y); return 0; } int kuasa(x,y) { if (y=0) return 1; else if(y==1) return x; else return(x*kuasa(x,y-1); }

# data[].attributes.body
#include <iostream.h> int kuasa (int x,int y); int main() { int x; int y; int kuasa; cin>>x; cin>>y; nilai=kuasa(int x, int y); cout<<nilai; } int kuasa (int x, int y); { if y==0 return 1; else if y==1; return x; else return(x*kuasa(x,y-1); }

# data[].attributes.body
Int F(int,int); Int main() { Int m,n,nilai; cin>>m>>n; nilai=F(m,n) cout<<nilai; return 0; } int F(int M,int N) { if(M==0) return n+1; else if(N==0) return F(M-1,1); else return F(M-1,F(M,N-1)); }

# data[].attributes.body
#include <iostream> using namespace std; int kuasa (int,int) int main () { int X; int Y; cin >>X; cin >>Y; cout <<X+Y<<endl; return 0; { kuasa (int X,int Y) if (Y==0); return 1; else (Y=1); return=0

# data[].attributes.body
#include<iostream> using namespace std; int kuasa (X,Y) main() int X,Y, nilai cin>>X; cin>>Y; nilai=kuasa(X,Y); cout<<nilai; } int kuasa(int X,Y) { if (Y==0) return 1; else if (Y==1) return X; else return (x*KuasaX;( Y-1)); }

# data[].attributes.body
#include <iostream> using namespace std; int kuasa(int x,int y); main () { int x,y,nilai; cin>>x>>y; nilai=kuasa(x,y); cout<<nilai; return 0; } int kuasa(int x,int y); { if(y==0); return 1; else if (y==1); return x; else return* kuasa(x,y-1) }

# data[].attributes.body
#include <iostream.h> using namespace std; int kuasa (x,y); main ()

{ int x,y,value; cin>> x >> y; value = kuasa(x,y); } int kuasa(int x,` int y); { If (y==0); return x; else return (x*kuasa (x,y-1)); }

# data[].attributes.body
#include <iostream> using namespace std; int kuasa(int x, int y); int main() { int x,y,nilai; cin>> x; cin>> y; nilai = kuasa (x,y); cout<< nilai; return 0; } int kuasa (int x, int y) { if (y==0) return 1; else if (y==1) return x; else return (x*kuasa (x,y-1)); }

# data[].attributes.body
#include <iostream.h>

int Kuasa (int,int);
int main ()
{

int X, Y, nilai;
cin >> X ;
cin >> Y;
nilai = Kuasa(X,Y);
cout<< nilai;

return 0;
}

int Kuasa( int x, int y)
{
if (y==0)
return 1;
else
if (y==1)
return x;
else
return (x *Kuasa(x, y-1));
}

# data[].attributes.body
#include <iostream> using namespace std; int kuasa (int,int); main () { int X,int Y,nilai; cin >> X; cin >> Y; nilai = (X,Y) int Kuasa ( int x,y ) {if (y ==0)} return 1; {if (y == 1)} return x; else return*kuasa(x,y-1) }

# data[].attributes.body
#include<iostream.h> int Kuasa(int, int); int main() { int X, Y, nilai; cin>>X; cin>>Y; nilai = Kuasa(X,Y); cout<<nilai; } int kuasa(int x, int y) { if(y==0) return 1; else if (y==1) return x; else return x*kuasa(x,y-1); }

# data[].attributes.body
#include < iostream.h>

int kuasa(int x,int y);
main ()
{
int x;
int y;
int kuasa;

cin >>x;
cin >>y;
nilai = kuasa(int x,int y);
cout<<nilai;
return 0;

}
int kuasa ((int x,int y)
{
if y==0
return 1;

else
if y==1
return x;

else
return (x * kuasa (x,y-1));
}

# data[].attributes.body
#include <iostream>
using namespace std;

int kuasa (int x, int y);
main ()

int x,y,nilai;
cin>>x;
cin>>y;
nilai=kuasa (x,y);
cout<<nilai;

}

int kuasa(int X,Y)
{
if (Y==0)
return 1;
else if (Y==1)
return X;
else return (x*kuasa(X,Y-1));
}

# data[].attributes.body
#include<iostream.h> int kuasa(int x,int y); main() { int x,y,nilai; cin>>x>>y; nilai=kuasa(x,y); cout<<nilai; } int kuasa(int x,int y) { if(y==0) return 1, else if(y==1) return x, else return(x*kuasa(x,y-1)) }

# data[].attributes.body
#include <iostream.h>

int kuasa (int,int);

int main ()

{

int X, Y;

int nilai;

cin >> X;

cin >> Y;

nilai = kuasa(X,Y);

cout<<nilai;

return 0;

}

int kuasa (int X, int Y) { if (Y==0) return 1; else if(Y==1); return X; else return*kuasa(X,Y-1) }

# data[].attributes.body
int kuasa(int x,int y)

main()
{
int x,y,nilai;
cin>>x;
cin>>y;
nilai=kuasa(x,y);
cout<<nilai;
return0;
}
int kuasa (int x,int y)
{
if (y==0)
return1;
else
if(y==1)
return x;
else
return(x*kuasa(x,y-1);
}

# data[].attributes.body
int power(int x,int y)

int main()

{

int x,y,value; cin >> x;

cin >> y;

value = power(int x inty) } if (y == 0)|| (y == 1) return 1 else

return  x *(x , y-1)

}

# data[].attributes.body
#include<iostream> using namespace std; int kuasa(int x, int y); main () { int x,y,nilai; cin>>x>>y; nilai=kuasa(x,y); cout<<nilai; } int kuasa(int x, int y) { if(y==0) return 1; else if (y==1) return x; else return x*(kuasa (x,y-1)); }

# data[].attributes.body
#include <iostream>

int kuasa(int,int);
main()
{
int x,y,nilai;
cin>> x;
cin>> y;
nilai = kuasa(x,y);
}

int kuasa(int x,int y)
{
if (y=0)
return 1;

else if (y=1)
return x;

else return x*kuasa(x,y-1);
}

# data[].attributes.body
int Kuasa (int x, int y) main () { int x, y, nilai; cin >> x ; cin >> y; nilai = Kuasa(x,y); } int Kuasa( int x, int y) { if (y==0) return 1, else if (y==1) return x, else return (Kuasa(x, y-1)) } }

# data[].attributes.body
#include <iosteream>

int kuasa (int, int); main() { int x, int y, nilai; cin>> x; cin>> y; nilai=kuasa(x,y) } int kuasa (int x, int y) { if (y==0) return 1; else if(y==1); return x; else return*kuasa(x,y-1) }

# data[].attributes.body
int kuasa (X,Y)

main ()

int X,Y, nilai

cin>>X;

cin>>Y;

nilai=kuasa(X,Y);

cout<<nilai;

}

int kuasa(int X,Y)

{

if (Y==0)

return 1;

else if (Y==1)

return X;

else return x*kuasaX,Y-1));

}

# data[].attributes.body
int kuasa(int x,y); main() { int X,Y,value; cin>>X; cin>>Y;

value=kuasa(x,y);

return 0;

} int kuasa(int x,y)

{ if (y==0)

return 1;

else(y==1)

return x;

else return(x*kuasa(x,y-1);

}

# data[].attributes.body
int kuasa (int x,int y)

int main()

{

int X,Y,nilai;

cin>>X>>Y;

nilai=kuasa()

}

int kuasa (int x, int y)

{

if (y==0)

return 1;

else if (y==1)

return x;

else

return (x*kuasa(x,y-1))

}

# data[].attributes.body
int kuasa (int x, int y)

main()

{

int x, y ,nilai;

cin>>x>>y;

nilai=kuasa(x,y)

}

int kuasa(int x, int y)

{

if(y==0)

return 1;

else(y==1)

return x;

else return (x*kuasa(x,y-1)

}

# data[].attributes.body
int kuasa (int x, int y)

int main ()

{
int x, y, nilai;
cin >> x >> y ;
nilai = kuasa (x,y) ;
}
int kuasa ( int x, int y)
{
if (y==0)
return 1;
else
if (y==1)
return x;
else return (x*kuasa (x,y-1));
}

# data[].attributes.body
#include <iostream.h>

int Kuasa (int,int);
int main ()
{

int X, Y, nilai;
cin >> X >> Y;
nilai = Kuasa(X,Y);
cout<<nilai;

return 0;
}

int Kuasa( int x, int y)
{
if (y==0)
return 1;
else
if (y==1)
return x;
else
return (x*Kuasa(x, y-1));
}

# data[].attributes.body
Int kuasa(int ,int );

Int main()

{

Int X,Y,Answer;

Cin>>X;

Cin>>Y;

Answer=kuasa(X,Y);

cout<<Answer;

return 0;

}

Int kuasa(int x, int y)

{

If(y==0)

return 1;

else if(y=1)

return x;

else

return x*kuasa(x,y-1)

}

# data[].attributes.body
- fungsi yang memanggil dirinya sendiri

- terbahagi kepada 2 bahagian

- kes asas (untuk berhenti)

- memanggil dirinya sendiri (untuk berulang)

contoh aplikasi ialah fibbonachi, faktorial, kuasa, GCD, tower of hanoi, mencari no terbesar atau terkecil dan sebagainya.

- ia adalah masalah ulangan yang boleh diselesaikan dengan lelaran for atau while loop tetapi ia lebih efektif menggunakan rekursif.

- ia dikenali dikenali sebagai divide and conquer

# data[].attributes.body
http://www.algomation.com/algorithm/towers-hanoi-recursive-visualization

# data[].attributes.body
http://visualgo.net/recursion.html