fork download
  1. #include <stdio.h>
  2. int func(int n){
  3. if(n==0)
  4. return -1;
  5. else
  6. return 3*func(n-1)+5;
  7. }
  8. int main(void) {
  9. // your code goes here
  10. int n=3,m;
  11. printf("数列anについて、n=%dの時%d",n,func(n));
  12. return 0;
  13. }
  14.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
数列anについて、n=3の時38