生日

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 生日
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入您的出生日期   格式 如:1992-09-19");
           string old = Console.ReadLine();

           DateTime DT = DateTime.Now;

           DateTime b = new DateTime();

           b = DateTime.Parse(old);

           Console.WriteLine("您的生日:"+b);

           TimeSpan ts = DT - b;

           int X = ts.Days;

           Console.WriteLine("您活了" + X+"天");

           Console.ReadLine();


                

         

        }
    }
}

                

         

       

 

posted @ 2015-08-07 23:51  人走茶亦凉  阅读(177)  评论(0编辑  收藏  举报