阅读FORTRAN程序: DIMENSION M(4,3) DATE M/-

admin2022-08-02  31

问题 阅读FORTRAN程序:DIMENSION M(4,3)DATE M/-10,12,24,11,20,-15,61,78,93,30,44,-45/N(M(1,1)DO 101=1,4D010J=1,3IF(M(IJ)LT.N)THENN=M(I,J)Kl=lK2=JENDIF10CONTINUEWRITEC*,‘(2X,314),)N,K1,K2程序运行后的输出结果是:A. 93,3,1B.-10,1,1C.-45,4,3D.78,3,2

选项 A. 93,3,1
B.-10,1,1
C.-45,4,3
D.78,3,2

答案 C

解析 数组元素的值分别为:
M(l,l)=-10,M(2,1)=-12,M(3,1)=-24,M(4,1)=11;
M(l,2)=-20,M(2,2)=-15,M(3,2)=61,M(4,2)=78;
M(1,3)=93,M(2,3)=30,M(3,3)=44,M(4,3)=-45;
最后一次循环:N=M(4,3)=-45,K1=4:,K2=3
答案:C
转载请注明原文地址:https://tihaiku.com/jzgc/270275.html

最新回复(0)