Problem Q: 零起点学算法12——求2个日期之间的天数

#include<stdio.h>
int main()
{
    int a1,b1,c1,a2,b2,c2,s;
    scanf("%d-%d-%d",&a1,&b1,&c1);
    scanf("%d-%d-%d",&a2,&b2,&c2); 
    s=c2-c1-1;
    printf("%d",s);
    return 0;
} 

 

posted @ 2018-09-28 18:22  MichaelCecil  阅读(418)  评论(0)    收藏  举报