Recent Posts
printf("ho_tari\n");
isOrdinary 본문
#include <stdio.h>
int main(void)
{
int year;
scanf("%d", &year);
int isOrdinary = !(year % 4 == 0 && year % 100 != 0 || year % 400 == 0);
//int isOrdinary = (year % 4 != 0 || year % 100 == 0 && year % 400 == 0);
printf("%d is a ordinary : %d\n", year, isOrdinary);
return 0;
}
<compile 결과>
'C' 카테고리의 다른 글
letterAttribute2 (0) | 2023.09.01 |
---|---|
letterAttribute (0) | 2023.09.01 |
isLeap (0) | 2023.09.01 |
incrementor (0) | 2023.09.01 |
isAlphabet (0) | 2023.09.01 |