コード例 #1
0
ファイル: Program.cs プロジェクト: dfollett/projects
        static void Main(string[] args)
        {
            Forest f = new Forest("Columbia");

            Forest.PrintTreeFacts();
            f.Burn();
            f.Grow();
            f.Grow();
            Console.WriteLine(f.Trees);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: djken/C-Sharp-Codecademy
        static void Main(string[] args)
        {
            Forest f = new Forest("Congo", "Tropical");

            f.Grow();

            Console.WriteLine(Forest.TreeFacts);
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: AlbertShevchuk/C_Sharp
        static void Main(string[] args)
        {
            Forest f = new Forest("Amazon");

            Console.WriteLine(f.Trees);

            for (var i = 0; f.age < 5; i++)
            {
                f.Grow();
            }

            Console.WriteLine(f.Trees);
            f.Burn();

            Console.WriteLine(f.Trees);
            Console.WriteLine(f.age);

            Console.WriteLine();
            Forest.PrintTreeFacts();
        }