2009年4月22日过999天是几号?

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/06 00:54:26

2009年4月22日过999天是几号?

#include
#include
void main()
{
struct tm begin_tm,end_tm;
time_t begin_time,end_time;

 begin_tm.tm_sec=0;
 begin_tm.tm_min=0;
 begin_tm.tm_hour=0;
 begin_tm.tm_mday=22;
 begin_tm.tm_mon=4-1;
 begin_tm.tm_year=2009-1900;
 begin_time=mktime(&begin_tm);

 end_time=begin_time+86400l*999;/* 每天86400秒 */
 end_tm=*localtime(&end_time);
printf("%d-%d-%d\n",end_tm.tm_year+1900,end_tm.tm_mon+1,end_tm.tm_mday);
}
2012-1-15