c#之习题

 int n = 1;
            double zg = 1;
            double rb = 4;

            while (zg < rb)
            {
                n++;

                int k = 1;
                while (k <= 4)
                {
                    k++;
                    zg = zg + (zg * 0.0225);
                    rb = rb + (zg * 0.003);
                   
                }

            }
            Console.WriteLine("中国经济赶超日本需要{0}年", n);
            Console.ReadKey();


日本经济规模是中国的4陪
日本每季度经济增长0.3%
中国每季度增长2.25%
中国多少年后超过日本

  

原文地址:https://www.cnblogs.com/mengluo/p/5520666.html