import java.util.*; public class Number { public static void main(String[] args) { Scanner in=new Scanner(System.in); System.out.println("输入身份证号"); String number=in.nextLine(); System.out.println(number.substring(6, 10)+"-"+number.substring(10, 12)+"-"+number.substring(12, 14)); } }
原文地址:https://www.cnblogs.com/2017xinghui/p/9638122.html
时间: 2024-10-24 20:10:48