dimension a (3) s=0 for k=1 to 3 a(k)=3-k s=s+k endfor a(1),
来源:学生作业帮 编辑:神马作文网作业帮 分类:英语作业 时间:2024/09/25 10:25:06
dimension a (3) s=0 for k=1 to 3 a(k)=3-k s=s+k endfor a(1),a(2),a(3),s
so easy .
first ,we move on to k.If k equals 1,then we have a(1)=3-1=2.Thus S=0+k=0+1=1
next,again,we continue this process ,which we have a(2)=3-2=1.And S=1+2=3.
Finally,if k is 3,we will get a(3)=3-3=0 ,and s=3+3=6.
Therefore,a(1)=2,a(2)=1,a(3)=0 and s=6.
楼主下次发题请用中文.请用自然语言& 别写循环语句.
first ,we move on to k.If k equals 1,then we have a(1)=3-1=2.Thus S=0+k=0+1=1
next,again,we continue this process ,which we have a(2)=3-2=1.And S=1+2=3.
Finally,if k is 3,we will get a(3)=3-3=0 ,and s=3+3=6.
Therefore,a(1)=2,a(2)=1,a(3)=0 and s=6.
楼主下次发题请用中文.请用自然语言& 别写循环语句.
dimension a (3) s=0 for k=1 to 3 a(k)=3-k s=s+k endfor a(1),
a = array(1,2,3,4,5):for k = 1 to 4:s = s + a(k)中的s = s + a(
a=0 For i = 1 To 8 For k = 1 To 7 a = a + 1 Endfor Endfor a
int k,s; for(k=s=0;k
#include #define S(x) x*x void main() { int a,k=3,m=1; a=S(k
VFP题,N=10 S=0 FOR K=N-8 TO N-9 S=S+K N=N-1 ENDFOR S RETURN我不
执行以下程序段后,s的值是【 】 int a [ ]={5,3,7,2,1,5,3,10},s=0,k; for(k=0
计算s=1k+2k+3k+……+N k
VB题 a=5 For k=1 To 0 a=a+k Next k Print k;a
s=0,执行语句 for(k=1;k
已知P={x|x=3k,k∈Z},Q={x|x=3k+1,k∈Z},S={X|X=3K+2,K∈Z},a∈P,b∈Q,c
执行以下程序段后, s的值是【1】int a[]={5,3,7,2,1,5,3,10},s=0,k; for(k=0;k