107. 閏年平年判斷

 avatar
user_6817964
c_cpp
2 years ago
278 B
0
Indexable
Never
void years(int year);

void years(int year) {
	if (year % 4 != 0 || (year % 100 == 0 && year % 400 != 0)) {
		printf("%d是平年", year);
	}
	else {
		printf("%d是閏年", year);
	}
}

int main() {
	int year;
	scanf("%d", &year);
	years(year);
	return 0;
}