コード例 #1
0
        public static void Main(string[] args)
        {
            CoinGenerator gen = new CoinGenerator();

            for(int i = 0; i < 20; i++)
                Console.WriteLine(gen.GenerateCoins(100));
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            CoinGenerator gen = new CoinGenerator();

            for (int i = 0; i < 20; i++)
            {
                Console.WriteLine(gen.GenerateCoins(100));
            }
        }
コード例 #3
0
        static public void generateCoins()
        {
            // Get the upper limit for the coins

            int upperLimit = Helper.GetIntFromUser(
                "Enter the upper limit in GP: ");

            // Generate the result using the upper limit
            CoinResult result = coinGen.GenerateCoins(upperLimit);

            // Print out the result
            Console.WriteLine(result);
        }