单选

已知递归函数f(n)的功能是打印n,n-1,…,1,且n>=1,应采用的代码段是(42)。

  • A.if n>1 then f(n-1); printf("% d",n);
  • B.if n<1 then f(n+1); printf("% d", n);
  • C.printf("% d",n); if n>1 then f(n-1);
  • D.printf("% d", n); if n<1 then f(n+1);
参考答案
您可能感兴趣的试题

The CPU is composed of two components, which are(66).

  • A.asthmatics logic unit and controller
  • B.arithmetic logic unit and memory
  • C.memory and controller
  • D.controller and storage

(51)

  • A.1,1,1
  • B.1,1
  • C.1
  • D.i,k

(50)

  • A.0
  • B.i,k,0
  • C.i,k
  • D.i-1,k-1

(49)

  • A.1
  • B.2
  • C.2
  • D.4

(47)

  • A.原型项目
  • B.概念项目
  • C.改进项目
  • D.风险项目
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服