以下程序段执行后整型变量n 的值为 n=0 for i=1 to 20 step 5 n=n+i next I A.50
来源:学生作业帮 编辑:大师作文网作业帮 分类:数学作业 时间:2024/09/20 19:25:09
以下程序段执行后整型变量n 的值为 n=0 for i=1 to 20 step 5 n=n+i next I A.50 B.34 C.15 D.210
求C的值
if a>5 then
if b3 then c=a*b else c=a mod b end if
A.2 B.-1 C.1 D.6
这题也请说明下
求C的值
if a>5 then
if b3 then c=a*b else c=a mod b end if
A.2 B.-1 C.1 D.6
这题也请说明下
n=34,
for循环过程(i 每次加5):
i=1,n=0+1=1
i=6,n=1+6=7
i=11,n=7+11=18
i=16,n=18+16=34
第二道题不知道a和b的初始值,没法计算.
再问: 不好意思 a=2,b=3
再答: 首先,a=2,那麼if a>5不成立, 程序跳过 if b3 then c=a*b else c=a mod b 这一段,在这个 if 语句中, b=3,b>3不成立,所以执行else语句,也就是 c=a mod b,c=2 mod 3 =2, 所以,c=2
for循环过程(i 每次加5):
i=1,n=0+1=1
i=6,n=1+6=7
i=11,n=7+11=18
i=16,n=18+16=34
第二道题不知道a和b的初始值,没法计算.
再问: 不好意思 a=2,b=3
再答: 首先,a=2,那麼if a>5不成立, 程序跳过 if b3 then c=a*b else c=a mod b 这一段,在这个 if 语句中, b=3,b>3不成立,所以执行else语句,也就是 c=a mod b,c=2 mod 3 =2, 所以,c=2
以下程序段执行后整型变量n 的值为 n=0 for i=1 to 20 step 5 n=n+i next I A.50
假定有以下程序段 n=0 for i=1to4 for j =3 to -1 step -1 n=n+1 next j
假定,以下程序段,n=0 for i=1 to 3 for j=4 to -1 n=n+i next j next i运
假定有以下程序段 for i=1 to 3 for j=-4 to -1 n=n+1 next j next i 求最后
假定有以下程序段n=0for i=1 to 3for j= -4 to -1n=n+1next jnext i运行完毕后
n=0,for i=1to3,for j=-4 to-1,n=n+1,next j,next i.运行完后n的值?
执行下面的程序段后,x 的值为( ). x=5 For i=1 To 20 Step 2 x=x+i\5
执行下面程序后 X的值 X=5 for i = 1 to 20 step 2 X=X +i\5 next i
执行下列程序段后,变量T的值是?T=0 For x = 2To 3 n=1 DO While n《=x t=t+n :n
以下程序段运行后变量a的值为( ).int i=1,a=0; for( ;i
该VB程序段执行后,X的值是( ).X=5 For i=1 To 20 Step 2 x=x+i\5 Next i
下列程序段的执行结果为 dim a(5) for i=1 to 5 a(i)=i*i next i print a(i-