다음 코드에서 McCabe의 순환적 복잡도(cyclomatic complexity)는?
int TestMe(int x, int y, int z) {
if (x >= y) {
if (x >= z)
result = x;
else
result = z;
}
else
result = y;
}- ①1
- ②2
- ③3
- ④4
선지를 골라 바로 채점해 보세요.
정답 ③
출처: 인사혁신처 공개 기출(공공데이터포털, 이용허락 제한 없음)