首先出生年月日,年为四个数字,月与日都为两个数字,所以
然后分别打印
所以总代码为:
#include<stdio.h>
int main()
{
int a, b, c;
scanf("%4d %2d %2d", &a, &b, &c);
printf("year=%4d\n", a);
printf("month=%02d\n", b);
printf("date=%02d\n", c);
return 0;
}