5道简单的VF课后题.1.计算n!2.求1~100间的奇数之和与奇数个数3.1(X>0)计算{0(X=0)-1(X

来源:学生作业帮助网 编辑:六六作业网 时间:2024/12/20 05:42:41
5道简单的VF课后题.1.计算n!2.求1~100间的奇数之和与奇数个数3.1(X>0)计算{0(X=0)-1(X5道简单的VF课后题.1.计算n!2.求1~100间的奇数之和与奇数个数3.1(X>0

5道简单的VF课后题.1.计算n!2.求1~100间的奇数之和与奇数个数3.1(X>0)计算{0(X=0)-1(X
5道简单的VF课后题.
1.计算n!
2.求1~100间的奇数之和与奇数个数
3.
1(X>0)
计算{0(X=0)
-1(X

5道简单的VF课后题.1.计算n!2.求1~100间的奇数之和与奇数个数3.1(X>0)计算{0(X=0)-1(X
1、
clear
k=1
input "请输入N的值:" to n
for i=1 to n
k=k*i
endfor
?"n!=",k
2、
clear
s=0
k=1
for i=1 to 100 step 2
s=s+i
k=k+1
endfor
?"1~100间的奇数之和是:",s
?"1~100间的奇数个数有:",k
3、
clear
input "请输入x的值:" to x
do case
case x>0
y=1
case x=0
y=0
case x