判断闰年
代码参考:
#include<iostream> using namespace std; //判断闰年的函数 int leap(int year){ if((year%4!=0)||(year%100==0&&year%400!=0)) return 0; //0表示是平年 else return 1; //1表示是闰年 } int main() { cout<<leap(2000)<<endl; cout<<leap(1000)<<endl; cout<<leap(1996)<<endl; cout<<leap(2012)<<endl; return 0; }.jztagtree{max-height:85vh;right:0px}.jzDown{top:10vh}.jztagtree li a{background-color:#448EF6}.jztagtree li a:before{border-right:10px solid #448EF6}.jztagtree li a:hover{background:#0045a6}.jztagtree li a:hover::before{border-right:10px solid #0045a6}
$("#jztoc").toc({content: ".single", headings: "h1,h2,h3"});