// Fibonaqi.cpp : Defines the entry point for the console application.
/*
data:2013/10/05
auth:ljz
func:
斐波那契Fn的递归函数
*/
#include "stdafx.h"
#include "iostream"
using namespace std;
int Fibonaqi(int n)
{
if (n == 1 || n == 2)
{
return 1;
}
else
{
return ( Fibonaqi(n-1)+Fibonaqi(n-2) );
}
}
int main(int argc, char* argv[])
{
int m;
printf("输入一个数!
");
cin>>m;
cout<<Fibonaqi(m)<<endl;
return 0;
}