ãã®ããã«ãã¦ï¼ï¼ãè¨ç®ããã¾ãã ãã®ãããªå®ç¾©ã®ä»æ¹ãå帰çå®ç¾©ã¨è¨ãã¾ãã ãã®éä¹é¢æ°ã Basic ããã°ã©ã ã¨ãã¦å®ç¾ãã¦ã¿ãã¨ï¼ï¼Tiny Basic ã«ã¯éä¹é¢æ° Factorial ãå èµããã¦ãã¾ãããï¼å®éã«ãã®ãããªããã°ã©ã ãæ¸ãå¿ è¦ã¯ããã¾ããããï¼ Function Kaijyou(n) If n = 0 then Kaijyou = 1 Else Kaijyou = Kaijyou(n-1)*n End if End Function ã¨ãªãã¾ãããããï¼å®ã¯éä¹é¢æ°ã¯ï¼å帰ã使ããªãã¦ãï¼æ¬¡ã®ããã«å®ç¾ãããã¨ãåºæ¥ã¾ãã Function Kaijyou(n) F = 1 For i = 1 to n F = F * i Next i Kaijyou = F End Function ãã®ããã«å帰çããã°
{{#tags}}- {{label}}
{{/tags}}