运行下列程序后,输出结果是()
longfun(int n)
{long s;
if(n==1||n==2) s=2;
else s=n-fun(n-1);
return(s);
}
main()
{printf("%ld\n",fun(5));}
A.1 B.2 C.3 D.5正确答案B
运行下列程序后,输出结果是()
longfun(int n)
{long s;
if(n==1||n==2) s=2;
else s=n-fun(n-1);
return(s);
}
main()
{printf("%ld\n",fun(5));}
A.1 B.2 C.3 D.5正确答案B