PAT1026打卡-0924
2020-09-25 本文已影响0人
可爱的甜甜猪
include <iostream>
include <cmath>
using namespace std;
int main()
{
float C1,C2;
cin>>C1>>C2;
float c=(C2-C1)/100;
int shi=c/3600;
c=c-shi3600;
if(c<3599.5)
{
if(shi>=10)
cout<<shi<<":";
else
cout<<0<<shi<<":";
int fen=c/60;
c=c-fen60;
if(c<59.5)
{
if(fen>=10)
cout<<fen<<":";
else
cout<<0<<fen<<":";
int d=c;
if(c-d>=0.5)
d++;
if(d>=10)
cout<<d;
else
cout<<0<<d;
}
else
cout<<fen+1<<":"<<"00";
}
else
cout<<shi+1<<":"<<"00"<<":"<<"00";
return 0;
}