閏年

 avatar
user_6817964
c_cpp
2 years ago
271 B
0
Indexable
Never
#include <stdbool.h> // bool
#include <stdio.h> // printf
int main()
{
	int chinese_year;
	scanf_s("%d", &chinese_year);
	int year = chinese_year + 1911;
	bool leap_year = (year % 400 == 0) || ((year % 4 == 0) && (year % 100 != 0));
	printf("%d\n", leap_year);
}