1 #include<stdio.h> 2 3 int main(void) 4 { 5 int year = 0; 6 int month = 0; 7 int day = 0; 8 9 scanf_s("%2d-%2d-%4d", &month,&day,&year); 10 11 printf("%04d-%02d-%02d ", year,month,day); 12 13 return 0; 14 }
控制输入输出的格式。