zoukankan      html  css  js  c++  java
  • 递归裴波那契数列

    using System;
    using System.Collections.Generic;

    public class MyClass
    {
        
    public static void Main()
        
    {
            
    int a=Fb(6);
            WL(a);
            RL();
        }

        
    public  static int Fb(int n)
        
    {
            
    int result=0;
            
    if(n==1 || n==2)
                result
    =1;
            
    else
                result
    =Fb(n-2)+Fb(n-1);
            
    return result;
        }

        
        
    Helper methods
    }
  • 相关阅读:
    计网 | 文件传输协议
    Java | JDK8 | Integer
    2.项目管理-应用工具
    1.需求管理
    1.短视频运营基础
    10.视频效果---变形稳定器
    9.时间重映射
    8.效果控件之移动&&缩放
    7.标记
    6.子剪辑与合并剪辑
  • 原文地址:https://www.cnblogs.com/solo/p/1061526.html
Copyright © 2011-2022 走看看