/* 2. ´ÙÀ½ ÇÁ·Î±×·¥ÀÇ Ãâ·ÂÀ» ½á¶ó. */ #include int f(int x,int s[]) { if (x < 5) { if (s[x] >= 3) return 1+f(x+1,s); else return f(x+1,s); } else { return 0; } } void main() { int array[5] = { 1,8,2,7,3 }; // ¿©±â¸¦ ¹Ù²Ü °Í printf("result = %d\n",f(0,array)); }