long s, mo, h, d, m, y, mm, ss, hh, _mo, yy;
long sec;
cout << "Enter Input : ";
cin >> sec;
y = sec / 31104000;
yy = sec % 31104000;
mo = yy / 2592000;
_mo = yy % 2592000;
d = _mo / 86400;
hh = _mo % 86400;
h = hh / 3600;
mm = hh % 3600;
m = mm / 60;
ss = mm % 60;
s = ss % 60;
cout << y << " Years " << mo << " Month " << d << " Day " << h << " hours " << m << " minute " << s << " second" << endl;
ไม่มีความคิดเห็น:
แสดงความคิดเห็น