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

推荐订阅源

K
Kaspersky official blog
云风的 BLOG
云风的 BLOG
IT之家
IT之家
T
The Blog of Author Tim Ferriss
C
Check Point Blog
N
Netflix TechBlog - Medium
宝玉的分享
宝玉的分享
T
Tailwind CSS Blog
G
Google Developers Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
F
Fortinet All Blogs
D
DataBreaches.Net
The Register - Security
The Register - Security
L
LINUX DO - 最新话题
W
WeLiveSecurity
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V2EX - 技术
V2EX - 技术
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
小众软件
小众软件
F
Full Disclosure
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
I
InfoQ
S
Secure Thoughts
TaoSecurity Blog
TaoSecurity Blog
MyScale Blog
MyScale Blog
AI
AI
Recent Announcements
Recent Announcements
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
CXSECURITY Database RSS Feed - CXSecurity.com
V
Vulnerabilities – Threatpost
NISL@THU
NISL@THU
SecWiki News
SecWiki News
Cisco Talos Blog
Cisco Talos Blog
H
Heimdal Security Blog
Y
Y Combinator Blog
N
News | PayPal Newsroom
P
Privacy International News Feed
美团技术团队
Attack and Defense Labs
Attack and Defense Labs
D
Docker
PCI Perspectives
PCI Perspectives
Webroot Blog
Webroot Blog
A
About on SuperTechFans
A
Arctic Wolf
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
MongoDB | Blog
MongoDB | Blog
T
Threat Research - Cisco Blogs

博客园 - 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