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

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 15:54:49
5道简单的VF课后题.1.计算n!2.求1~100间的奇数之和与奇数个数3.1(X>0)计算{0(X=0)-1(X
x)3}8Sj s{~ }/3{numl2340x9} PӥϦnx餞';=vtB;$d $,%`PSns8,u~F0#9'5ʶ5әy% J/oo֥~ ;3KI$_!(-H!!m fL{

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