---
# System prepended metadata

title: Untitled

---

#include <stdio.h>
int fibonacci(int f);
int main(void){
    int f;
    printf("数値入力ー＞");
    scanf("%d",&f);
    printf("フィボナッチ数列の第%d項は%d",f,fibonacci(f));
    return 0;
}


int fibonacci(int f){
    if(f==1||f==2){
        return 1;
    }else{
        return fibonacci(f-1)+fibonacci(f-2);
    }
}


