#include<stdio.h> #include<time.h> int leap (int year)//判断闰年 { if(year%4==0&&year%100!=0||year%400==0) return 1; else return 0; } int days_month (int month,int year)//判断月 { if(month==1||month==3||month==5||month==7||month==8||month==10||month==12) return 31; if(month==4||month==6||month==9||month==11) return 30; if(month==2&&leap(year)==1) return 29; else return 28; } int firstday(int month,int year)//判断年 { int w; w=(1+2*month+3*(month+1)/5+year+year/4+year/400-year/100)%7+1; return w; } main() { //调用系统时间 time_al; struct tm *now; al = time(NULL); now = localtime(&al); printf("现在时间: %4d年 %d月 %02d日 %d:%02d:%02d ", now->tm_year+1900, now->tm_mon+1, now->tm_mday, now->tm_hour, now->tm_min, now->tm_sec); //调用结束 int i,j=1,k=1,a,b,month,year; b=days_month(now->tm_mon+1,now->tm_year+1900); a=firstday (now->tm_mon+1,now->tm_year+1900); printf(" Sun Mon Tue Wed Thu Fri Sat "); if(a==7) { for(i=1;i<=b;i++) { printf("%4d",i); if(i%7==0) { printf(" "); } } } if(a!=7) { while (j<=4*a) { printf(" "); j++; } for(i=1;i<=b;i++) { printf("%4d",i); if(i==7*k-a) { printf(" "); k++; } } } printf(" "); }
自己加入主题,时间。
祝你成功!不懂找我!
Contabo自4月份在新加坡增设数据中心以后,这才短短的过去不到3个月,现在同时新增了美国纽约和西雅图数据中心。可见Contabo加速了全球布局,目前可选的数据中心包括:德国本土、美国东部(纽约)、美国西部(西雅图)、美国中部(圣路易斯)和亚洲的新加坡数据中心。为了庆祝美国独立日和新增数据中心,自7月4日开始,购买美国地区的VPS、VDS和独立服务器均免设置费。Contabo是德国的老牌服务商,...
vollcloud LLC创立于2020年,是一家以互联网基础业务服务为主的 技术型企业,运营全球数据中心业务。致力于全球服务器租用、托管及云计算、DDOS安 全防护、数据实时存储、 高防服务器加速、域名、智能高防服务器、网络安全服务解决方案等领域的智 能化、规范化的体验服务。所有购买年付产品免费更换香港原生IP(支持解锁奈飞),商家承诺,支持3天内无条件退款(原路退回)!点击进入:vollclo...
buyvm的第四个数据中心上线了,位于美国东南沿海的迈阿密市。迈阿密的VPS依旧和buyvm其他机房的一样,KVM虚拟,Ryzen 9 3900x、DDR4、NVMe、1Gbps带宽、不限流量。目前还没有看见buyvm上架迈阿密的block storage,估计不久也会有的。 官方网站:https://my.frantech.ca/cart.php?gid=48 加密货币、信用卡、PayPal、...