第一步,请用记事本打开 farm_fm.csv 文件,删除其中全部的百分号 第二步,用以下代码: [Fortran] 纯文本查看 复制代码 program main implicit none integer i,j integer ::k integer ::b,c real ::a(48,11) real l,m,n,o,p,q,r_fm,s_at,t open(12 , file ="/home/iga_qtong/fortran_xcao/farm/farm_fm.csv") open(13 , file ="/home/iga_qtong/fortran_xcao/farm/farmout.csv") ! read(12,*) a(i,j) read(12,*) ((a(i,j), j=1,c),i=1,b) do read(12,*,iostat=k) a(48,11) if (k/=0) exit do i=1,48 do j=1,11 l=a(i,1)*a(i,2)*a(i,3) m=a(i,1)*a(i,2)*a(i,4) n=l/a(i,5) o=m/a(i,6) p=n*a(i,7)*a(i,8) q=o*a(i,7)*a(i,9) r_fm=p*a(i,10)*10 s_at=q*a(i,11)*10 t=r_fm+s_at write(13,*) l,',',m,',',n,',',o,',',p,',', & q,',',r_fm,',',s_at,',',t end do end do end do close(12) close(13) end program main |
捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )
GMT+8, 2024-12-24 04:30