【单选题】已知程序如下,该程序实现的功能为_____。(10)main()(20){intcounter;(30)...//输入N值的语句,略(40)longproduct=1;(50)forcounter=1toNstep2(60){product=product*counter;}(70)returnproduct;(80)}
A.
product = 1*3*5*...* (N-1)
B.
product = 1*2*3*...*(N-1)
C.
product = 1+ 2+3+...+ (N-1)
D.
product = 1+3+5+...+(N-1)
【单选题】已知程序如下,该程序实现的功能为_____。 main() {int counter; .. //输入N值的语句,略 Long product = 1; For counter =1toN step 2 {product=product*counter;} Return product; }
A.
product = 1*2*3*...*(N-1)
B.
product = 1+ 2+3+...+ (N-1)
C.
product = 1*3*5*...* (N-1)
D.
product = 1+3+5+...+(N-1)
【单选题】氮气进行绝热可逆膨胀过程,下列哪个选项成立
【单选题】已知程序如下,该程序实现的功能为( )。12345N = eval(input("请输入一个大于零的偶数:"))product = 1for counter in range(1,N,2): product = product * counterprint(product)
A.
product = 1 * 2 * 3 *...* (N-1)
B.
product = 1 + 2 + 3 + ...+ (N-1)
C.
product = 1 * 3 * 5 *...* (N-1)
D.
product = 1 + 3 + 5 +...+ (N-1)
【单选题】已知程序如下,该程序实现的功能为_____。(10)main()(20){intcounter;(30)...//输入N值的语句,略(40)longproduct=1;(50)forcounter=1toNstep2(60){product=product*counter;}(70)returnproduct;(80)}
A.
product = 1*2*3*...*(N-1)
B.
product = 1+ 2+3+...+ (N-1)
C.
product = 1*3*5*...* (N-1)
D.
product = 1+3+5+...+(N-1)
【单选题】已知程序如下,该程序实现的功能为( )。123456sum = 0p = 1n = eval(input("请输入一个正整数:"))for i in range(1,n+1): p = p * i sum = sum + p
A.
sum = 1 * 2 * 3 *... * n
B.
sum = 1! + 2! +...+ n!
C.
sum = 1 + 2 + 3 +...+ n
D.
sum = 1 * 2 + 2 * 3 + (n-1) * n