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

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/01 18:52:59
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

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
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

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.
楼主下次发题请用中文.请用自然语言& 别写循环语句.

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 VFP中 CLEAR DIMENSION a(3) FOR N=1 TO 3 S=4 a(N)=N*2+1 S=S+a(N) ENDFOR S DIMENSION A(2,3) A=175 A(2,2)=2*A(2,2) A(5),A(1,vf程序设计 java语言:Dimension currentPos=new Dimension();是什么意思? Fortran里面dimension A(6,3)是什么意思?dimension是定义一个一维数组吗?那么A(6,3)应该怎么解释呢,谢谢各位~~~ vf中do while-enddo循环的嵌套怎么执行循环的?急set talk offclear dimension a(2,3)i=1do while i a new dimension of life a new dimension of life 急用!11 麻烦帮我详细讲解vf中的题目:DIMENSION A(2,3) A=175 A(2,2)=2*A(2,2) A(5),A(1,2) 输出为:350 175 vf中dimension S(2,求教解的思路. vfp中 dimension a (3,4) a=8 a(3,4)=5 a(3) 输出结果是 a(3)=8 请问为什么结果是8,怎么算出来的. Consider a free particle of mass m in one dimension.Calculate it's propagator in momentum space:.This propagator is the probability amplitude for a system originally prepared to be in state | Pa> at t=ta to be found in state | Pb> at a later time t=t VFP中DIMENSION K(3,4)啥意思? matlab 老说我Subscripted assignment dimension mismatch.这是我的代码a=[0,2,2,0,-3,0];l=length(a);w=(0:0.1:100);p=length(w);yw=zeros(p,l-1);for m=1:l-1 for n=1:p if m == 1 yw(n,m)=((a(m)*(1-exp(-1i*w(n)*0.5))/... (1i*w( Error: Syntax error, found IDENTIFIER 'B' when expecting one of: , ;dimension a(4,5) b(5,3) c(4,3) fortran 语言的 这是什么错误啊 关于vf的题,DIMENSION A(6)FOR K=1 TO 6A(K)=20-2*kENDFORK=5DO WHILE K>=1A(K)=A(K)-A(K+1)K=K-1ENDDOA(1),A(3),A(5) 谁能把每句fortran语言都给我翻译一下integer row,i,j,k,nreal sreal,dimension(:,:),allocatable::a,l,ureal,dimension(:),allocatable::b,x,yread*,rowallocate(a(row,row))read*,((a(i,j),j=1,row),i=1,row)allocate(b(row))read*,(b(i),i=1,row)alloc a(1,:)=perms([1 2 3 4 5])在matlab中为什么出错为Subscripted assignment dimension mismatchfor r=1:1:120a(1,:)=perms([1 2 3 4 5 ])以上是否可以输出矩阵a第一行的所有情况 程序清单如下:DIMENSION X(2,3) X=123 X(2,2)=100 X(2,2),X(2,3)