using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ToolGood.Words;
namespace PinYinXiangGuan
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                var name = Console.ReadLine();
                if (string.IsNullOrEmpty(name))
                {
                    break;
                }
                //获取汉字的首字母
                Console.WriteLine(WordsHelper.GetFirstPinYin(name));
            }
        }
    }
}

原文:https://www.cnblogs.com/yu-yi/p/9488643.html