出生日期输入输出(java实现)
出生日期输入输出
http://www.nowcoder.com/questionTerminal/4a4a9dd1edb6453ba4a0432319200743
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); System.out.print( "year=" + str.substring(0, 4) + "\nmonth=" + str.substring(4, 6) + "\ndate=" + str.substring(6, 8)); } }