由买买提看人间百态

topics

全部话题 - 话题: diffmonth
(共0页)
g*********g
发帖数: 114
1
来自主题: JobHunting版 - 怎么计算两天之间的时间间隔
DiffYear (int year1,int year2)
{
Int year = year1 - year2;
return year
}
DiffMonth(int month1,int month2)
{
int month = month1-month2;
return month;
}
DiffDay(int day1, int day2)
{
int day = day1-day2;
return day;
}
int main
{
System.output(DiffYear(2011,2009)*365+DiffMonth(11,10)* 30+ DiffDay(30,29
))
}
(共0页)