wang-kaifeng
   Console.WriteLine("请输入身份证号");
            string s = Console.ReadLine();
            string jqn = s.Substring(6, 4);
            string jqy = s.Substring(10, 2);
            string jqr = s.Substring(12, 2);
            Console.WriteLine("你的生日是:{0}年{1}月{2}日", jqn, jqy, jqr);
            int t = int.Parse(jqn);
            Console.WriteLine("请输入今年的年份");
            int j = int.Parse(Console.ReadLine());
            int sh = j - t;
            Console.WriteLine("你今年{0}岁了", sh);

 

分类:

技术点:

相关文章:

  • 2021-12-14
  • 2021-11-04
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
  • 2021-12-14
猜你喜欢
  • 2022-12-23
  • 2021-10-12
  • 2021-12-14
  • 2022-12-23
  • 2021-12-14
  • 2021-12-14
相关资源
相似解决方案