输入身份证号,得到生日

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);

 

posted @ 2016-04-21 14:42  五月十九  阅读(222)  评论(0编辑  收藏  举报