왜 "expected ';' after expression
및 expressions result unused
의 오류가 발생합니까?오류 : 예상 ';' 표현식 및 표현식 결과가 사용되지 않은 후에
#include <cs50.h>
#include <stdio.h>
int main(void)
{
printf("How tall do you want your pyramid to be?\n");
int height = GetInt();
if (height > 23 && height < 1)
{
printf("Please use a positive number no greater than 23:\n");
}
else (height > 0 && height <= 23)
{
printf("Thanks!\n");
}
}
'else'대신에 else if를 원합니다. '(height> 0 && height <= 23)'를 삭제하십시오. 또한'height> 23 && height < 1' -->'height> 23 || 높이 <1' – BLUEPIXY
@BLUEPIXY : 답변으로 게시하지 않는 이유는 무엇입니까? –
@RudyVelthuis 이것은 오타입니다. – BLUEPIXY