~cpp 
#include <iostream> 
using namespace std; 
int pivo(int a); 
int main() 
{ 
	int input;
	cout << "입력하시오:";
    cin >> input;
	cout << pivo(input);
	cout << endl;
	return 0;
}
int pivo(int a)
{
	if(a==0)
		return 0;
	if(a==1)
		return 1;
	return pivo(a-2) + pivo(a-1);
}


Retrieved from http://wiki.zeropage.org/wiki.php/피보나치/강희경
last modified 2021-02-07 05:31:27