惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
博客园 - Franky
GbyAI
GbyAI
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
爱范儿
爱范儿
IT之家
IT之家
酷 壳 – CoolShell
酷 壳 – CoolShell
aimingoo的专栏
aimingoo的专栏
博客园_首页
MongoDB | Blog
MongoDB | Blog
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Recent Announcements
Recent Announcements
Scott Helme
Scott Helme
有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
C
CERT Recently Published Vulnerability Notes
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
F
Fortinet All Blogs
N
Netflix TechBlog - Medium
L
LangChain Blog
L
LINUX DO - 最新话题
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
H
Hacker News: Front Page
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
G
Google Developers Blog
Google DeepMind News
Google DeepMind News
AI
AI
T
Troy Hunt's Blog
Microsoft Azure Blog
Microsoft Azure Blog
阮一峰的网络日志
阮一峰的网络日志
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Vercel News
Vercel News
Microsoft Security Blog
Microsoft Security Blog
罗磊的独立博客
S
Secure Thoughts
大猫的无限游戏
大猫的无限游戏
博客园 - 叶小钗
人人都是产品经理
人人都是产品经理
Blog — PlanetScale
Blog — PlanetScale
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
S
Security @ Cisco Blogs
Cloudbric
Cloudbric
E
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs

博客园 - Sleet(冰雨)

中国免费资源站全集 论程序员与妓女 I Believe I Can Fly 开机BIOS语言一点通 开始→运行→输入的命令集锦(较全) 局域网类故障 c++程序员的爱情诗 湖北城市班级篇 众球星对Baggio的评价! 被称为世上最经典的25句话! 大学生的毕业前与毕业后 比尔盖茨死了 用VB制作一个简单的MP3播放器 用diskid.dll和disk32.dll获得硬盘序列号 春天来了(散文诗) 经典的大学学习生活心得 2004年最欠揍的短信息(转) 《我的理想女友》(转帖) BBS,你给了我那么多!(转帖)
License的C语言代码!
Sleet(冰雨) · 2005-06-17 · via 博客园 - Sleet(冰雨)

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define OVERDAY 30
long GetDateToDays(int Year,int Mon,int Day);
main()
{
   FILE *fp;
   int  Day,Mon,Year;
   long SysDays;
   long FileDays;

   time_t timep;
   struct tm *p;
   time(&timep);
   p=localtime(&timep);

   if((fp=fopen("c:\jlsj.txt","r"))==NULL)
   {
      fprintf(stderr,"error read *.txt!\n");
      exit(0);
      }
      fscanf(fp,"%d%d%d",&Year,&Mon,&Day);
      fclose(fp);


   SysDays = GetDateToDays(p->tm_year+1900,p->tm_mon,p->tm_mday);
   FileDays = GetDateToDays(Year,Mon,Day);

   if(SysDays-FileDays>=OVERDAY)
   {
 fprintf(stderr,"overday!\n");
 }
   else
 printf("inday!\n");

   printf("xitongtianshu:%ld\n",SysDays);

   printf("wenjiantianshu:%ld\n",FileDays);

  }

   long GetDateToDays(int Year,int Mon,int Day)
   {
    long Days=0;
    int  i=0,j=0;
    int  Rn[]={31,28,31,30,31,30,31,31,30,31,30,31};

    for(i=1900;i<=Year-1;i++)
    {
       if((i%4==0 && i%100!=0) || i%400==0)
       Days+=366;
       else
       Days+=365;
       }

       if((Year%4==0 && Year%100!=0) || Year%400==0)
       Rn[1]=29;
   if(Mon!=1)
   {
      for(i=0;i<Mon-2;i++)
      {
       Days+=Rn[i];
       }
       }
       Days +=Day;
       return Days;
       }

附件:/Files/welldoneyc/tc20.zip