===============================================================================
試題說明 :
===============================================================================
補(bǔ)充編制fortran77程序prog1.for,其功能是計算并輸出1000
以內(nèi)所有能被73或127整除的自然數(shù)的平方根之和。
請編寫該程序,最后運(yùn)行程序。其中部分程序與輸出子程序
writedat在程序中已經(jīng)給出,不得修改。
===============================================================================
程序 :
===============================================================================
write(*,100) s
100 format(1x,'s=',e12.4)
write(*,*)
call writedat(s)
end
subroutine writedat(s)
open(10,file='bc03.out',status='new')
write(10,100) s
100 format(1x,e12.4)
end
===============================================================================
所需數(shù)據(jù) :
===============================================================================
@3 $bc03.out 001
|.4326e+03
#e
試題說明 :
===============================================================================
補(bǔ)充編制fortran77程序prog1.for,其功能是計算并輸出1000
以內(nèi)所有能被73或127整除的自然數(shù)的平方根之和。
請編寫該程序,最后運(yùn)行程序。其中部分程序與輸出子程序
writedat在程序中已經(jīng)給出,不得修改。
===============================================================================
程序 :
===============================================================================
write(*,100) s
100 format(1x,'s=',e12.4)
write(*,*)
call writedat(s)
end
subroutine writedat(s)
open(10,file='bc03.out',status='new')
write(10,100) s
100 format(1x,e12.4)
end
===============================================================================
所需數(shù)據(jù) :
===============================================================================
@3 $bc03.out 001
|.4326e+03
#e