当前位置:百科知识 > 优学院题库

问题描述:

[单选] 若要表达从1计算到n的运算组合式,(* …(* (* (* (* 1 1)2)3)4)…n)定义一个过程。正确的定义为()。
A.(define (f product counter max-count) (cond ((> counter max-count) product) ((<= counter max-count) (f (* counter product) (+ counter 1) max-count )) )) B.(define (f product counter max-count) (f (* counter product) (+ counter 1) max-count )) C.(define (f product counter max-count) (cond ((> counter max-count) product) ((<= counter max-count) (f (counter*product) (counter+ 1) max-count )) )) D.(define (f product counter max-count) (cond ((> counter max-count) product) ((<= counter max-count) (f product counter max-count )) ))
参考答案:查看
答案解析:
☆收藏

随机题目