bool range(double x_start, double x_end, double y_start, double y_end)
{
if(x_start <= y_start && x_end <= y_end)
return true;
if (y_start <= x_start && y_end <= x_end)
return true;
return false;
}
x_start~x_end
y_start~y_end
사이 값 겹치는 값이 존재할 경우 true return;
없을 경우 true return;
'Programming 언어 > C++' 카테고리의 다른 글
[C++] 배열 최대값 구하기 (0) | 2020.11.25 |
---|---|
[C++] string 배열 수 세기 (0) | 2020.11.25 |
[C++] transform tolower toupper 문자열 소문자 대문자 변경 (0) | 2020.11.22 |