출력 결과가 원하는대로 나오질않습니다. 도와주세요
SweetChoco
2023.04.01
질문 요약 :실행결과가 무조건 굿모닝이나오네요. 이유를 알고싶습니다.질문 내용 :
//시각을 정수로 입력하면 6~10까지는 Good Morning 11~15시까지는 Good afternoon을
//16시~24시까지는 Good Night를 출력
#include stdio.h
int main(void)
{
int time;
printf(현재 시각을 입력하시오 .);
scanf(%d,&time);
if(6=time=10)
printf(Good Morning!\n);
else if(11=time=15)
printf(Good afternoon!\n);
else if(16=time=24)
printf(Good Night!\n);
return 0;
}