输入身份证号,得到生日

Console.WriteLine("请输入你的身份证号码:");
string a = Console.ReadLine();
string year = a.Substring(6, 4);
string month = a.Substring(10, 2);
string day = a.Substring(12, 2);
Console.WriteLine("你的生日是{0}年{1}月{2}日", year, month, day);

原文地址:https://www.cnblogs.com/zzc134680/p/5416877.html