fork download
  1. #include <stdio.h>
  2. //練習問題G
  3.  
  4. int func(int n){
  5. if(n<=100){
  6. return 10;
  7. }
  8. else{
  9. return func(n-3)+1;
  10. }
  11.  
  12. }
  13. int main(void) {
  14. printf("%d",func(2018));
  15. return 0;
  16. }
  17.  
Success #stdin #stdout 0s 5324KB
stdin
Standard input is empty
stdout
650