프로그래밍 언어 활용난도 상
8번 · 주관식 · 5점
다음 C 프로그램의 출력값을 쓰시오.
#include <stdio.h>
int calc(int n) {
static int state = 1;
if (n == 0) return state;
state += n;
int nested = calc(n - 2);
return nested + state;
}
int main(void) {
printf("%d", calc(4));
return 0;
}