2753번 - 윤년
여기서
#include int main(void) { int A; scanf("%d",&A); if(A%4==0 && A%100!=0){printf("1");} else if(A%400==0){printf("1");} 이 쪾 코드 부분에 else를 뺸다면 틀렸습니다가 뜹니다 왜 그런건가요? else{ printf("0"); }}
그렇게 할 경우 4를 입력했을 때 10이 출력됩니다.
댓글을 작성하려면 로그인해야 합니다.
junhwan16 2년 전
여기서
#include
int main(void) {
int A;
scanf("%d",&A);
if(A%4==0 && A%100!=0){printf("1");}
else if(A%400==0){printf("1");} 이 쪾 코드 부분에 else를 뺸다면 틀렸습니다가 뜹니다 왜 그런건가요?
else{
printf("0");
}
}