#include <stdio.h>
//フィボナッチ数列
int rec(int n){
int a1=1;
int a2=1;
int a3;
for(int i=3;i<=n;i++){
a3=a2+a1;
a1=a2;
a2=a3;
}
return a3;
}
int main(void) {
int n = 10;
printf("フィボナッチ数列の第%d項は%d\n", n
, rec
(n
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v44OV44Kj44Oc44OK44OD44OB5pWw5YiXCmludCByZWMoaW50IG4pewoJaW50IGExPTE7CglpbnQgYTI9MTsKCWludCBhMzsKCWZvcihpbnQgaT0zO2k8PW47aSsrKXsKCQlhMz1hMithMTsKIAkJYTE9YTI7CiAJCWEyPWEzOwogfQogcmV0dXJuIGEzOwp9CgppbnQgbWFpbih2b2lkKSB7CiAgICBpbnQgbiA9IDEwOwogICAgICAgIHByaW50Zigi44OV44Kj44Oc44OK44OD44OB5pWw5YiX44Gu56ysJWTpoIXjga8lZFxuIiwgbiwgcmVjKG4pKTsKCXJldHVybiAwOwp9Cgo=