fortran 程序 作业题.docxVIP

  • 7
  • 0
  • 约6.38千字
  • 约 24页
  • 2018-01-05 发布于河南
  • 举报
fortran 程序 作业题

programzuoyeimplicit noneinteger :: a(13)integer :: i,j,tinteger ::b,c,drealrnd(10)callrandom_seed()callrandom_number( rnd )a(1:10)=rnd(1:10)*100do i=1,9do j=i+1,10if(a(i) a(j))then t=a(i)a(i)=a(j)a(j)=tend ifend doend dowrite(*,(10I4)) a(:10)open(1,file=suijishu.txt)write(1,(10I4)) a(1:10)rewind(1)read(1,*) (a(i),i=1,10)write(*,*)please input three number:read (*,*) b,c,da(11:13)=(/b,c,d/)do i= 12,1,-1do j=1,iif ( a(j) a(j+1) ) then t= a(j)a(j)=a(j+1)a(j+1)=tend ifend doend dowrite(*,(13I4)) a(1:13)stopendprogramzuoyeimplicit noneinteger :: a(10)integer :: b(13)integer :: i,j,t

文档评论(0)

1亿VIP精品文档

相关文档