#include <stdio.h>
//練習問題F
int func(int n){
int a=-1;
int i;
if(n == 0)
return a;
else
return 3*func(n-1) + 5;
}
int main(void) {
int n = 3;
printf("数列anについて, n=%dのときの値は%d\n", n
, func
(n
)); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+Ci8v57e057+S5ZWP6aGMRgoKaW50IGZ1bmMoaW50IG4pewogICAgaW50IGE9LTE7CiAgICBpbnQgaTsgIAoJaWYobiA9PSAwKQoJCXJldHVybiBhOwoJZWxzZQoJCXJldHVybiAzKmZ1bmMobi0xKSArIDU7Cn0KaW50IG1haW4odm9pZCkgewoJaW50IG4gPSAzOwogICAgcHJpbnRmKCLmlbDliJdhbuOBq+OBpOOBhOOBpiwgbj0lZOOBruOBqOOBjeOBruWApOOBryVkXG4iLCBuLCBmdW5jKG4pKTsKCXJldHVybiAwOwp9Cg==