U E D R , A S I H C RSS

피보나치/강희경

~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);
}
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:27
Processing time 0.0112 sec