18.零起点学算法13——求2个时间之间的分钟数

#include<stdio.h>
int main()
{
    int h1,m1,h2,m2,s;
    while(scanf("%d:%d %d:%d",&h1,&m1,&h2,&m2)!=EOF)
    {
    s=(h1-h2)*60+m2-m1-1;
    printf("%d",s);
    }
    return 0;
}

猜你喜欢

转载自www.cnblogs.com/Estwind/p/9716211.html