P5711 【深基3.例3】闰年判断
作者:互联网
#include<stdio.h> int main() { int n; while(scanf("%d", &n) != EOF) { int flag = 0; if(n%4 == 0) { if(n%400 == 0) { flag++; } else if (n%100 != 0) { flag++; } } if(flag >= 1) { printf("1\n"); } else { printf("0\n"); } } return 0; }
标签:闰年,int,深基,n%,else,++,flag,printf,P5711 来源: https://www.cnblogs.com/White-Raffard/p/15465162.html