C언어 배운지 얼마 안된 초보에요! 질문있어요!
우수리
2023.04.01
질문 제목 :if 문 질문질문 요약 :입력받은 정수가 양수이지 음수인지 판단하는 프로그램을 if else 문을 이용하여 작성하시오질문 내용 :
#includestdio.h
void main()
{
int a,b;
printf(Enter the Number =);
scanf(%d %d, &a, &b);
if (a b)
printf(The maximum nuber = %d, a);
printf(The minimum number = %d, b);
else if (a b)
printf(The maximum nuber = %d, b);
printf(The minimum nuber = %d, a);
else
printf(You entered the same number);
}
정답을 보면 왜 정답인지 이해가 가지만, 제가 작성한 소스는 왜 잘못됬는지 이해가안가네요..ㅎㅎ
부탁드려용~