示例#1
0
        static void Main(string[] args)
        {
            int result = 0;

            while (true)
            {
                Console.WriteLine();
                PrintString("Please enter a number: ");
                var number = Utility.AcceptNumberInput(); //Int32.Parse(Console.ReadLine());

                result += number;

                PrintString("Enter 0 to Quit.");
                var input = Utility.AcceptNumberInput(); //Int32.Parse(Console.ReadLine());
                if (input == 0)
                {
                    break;
                }
            }

            PrintString("Total Is: " + result, true);
            PrintString("Bye Bye !", true);
        }