47
15
0
专家
program conjgf implicit none real(8) a(6,6) integer i1, i2 do i1 = 1,6 do i2 = 1,6 if (i1=i2) then a(i1,i2) = 0.0d0 else a(i1,i2) = i1+i2 end if enddo enddo print*,a read(*,*) end program conjgf
使用道具 举报
Transpose 发表于 2022-4-8 17:06 i1==i2,判断相等
青衣巷 发表于 2022-4-9 08:27 Fortran 是个矢量化的语言,所以它应该比C代码简洁一些。 [mw_shl_code=fortran,true]program conjgf
本版积分规则 发表回复 回帖后跳转到最后一页
捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )
GMT+8, 2024-5-9 22:45
Powered by Tencent X3.4
© 2013-2024 Tencent