#include < iostream >
using namespace std;
int main ()
{
int nHour;
int nMin;
int nSec;
int nTotalSec = 600 ;
nHour = nTotalSec / 3600 ;
nTotalSec -= nHour * 3600 ;
nMin = nTotalSec / 60 ;
nSec = nTotalSec - nMin * 60 ;
cout << " Hour: " << nHour << " Minute: " << nMin << " Second: " << nSec << endl;
return 0 ;
}
我搜索了一下,好几个页面,计算都是错误的,超级无语.....
如此简单的计算居然都算错,
实在不知道怎么说了....
时间: 2024-12-25 10:50:34