⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 program.cs

📁 将数字时间转换为英语口语表达形式
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;

namespace TimeConvert
{
    class Program
    {
        static StringCollection times = new StringCollection();

        static void Main(string[] args)
        {
            string command = "";

            do
            {
                command = Console.ReadLine();
                string[] numbers = command.Split(new char[] { ' ' });

                try
                {
                    string word = TimeConverter.Convert(Int32.Parse(numbers[0]), Int32.Parse(numbers[1]));

                    if (word != "It is the end!")
                    {
                        times.Add(word);
                    }
                }
                catch
                {
                    Console.WriteLine("Invalid input!");
                    break;
                }
            }
            while (command != "0 0");

            foreach (string s in times)
            {
                Console.WriteLine(s);
            }
            Console.Read();
        }
    }


}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -