赞
踩
- #include<stdio.h>
- int main()
- {
- int x;scanf("%d",&x);
- int a[6];
- for(int i=0;i<6;i++)
- {
- a[i]=x%10;
- x/=10;
- }
- int year=a[5]*1000+a[4]*100+a[3]*10+a[2];
- int month=a[1]*10+a[0];
- if(year>21&&year<100)year+=1900;
- if(year<=21)year+=2000;
- if(a[1]==0)printf("%d-0%d",year,month);
- else printf("%d-%d",year,month);
- }
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。