1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
program essai
integer :: i,j
integer, allocatable, dimension(:,:) :: m,p
character(99) :: outputfile
open (unit=1,file='listeessai',form='formatted',status='old',action='read')
i=1
do
read (1,'(i2)', end=100) m(i,1)
p(i,1)=m(i,1)
i=i+1
end do
100 continue
allocate (m(i,1))
allocate (p(i,1))
type *,'outputfile :'
read (*,'(a30)') outputfile
OPEN (UNIT =2,FILE =outputfile1,form='formatted',status="new",action="write")
do i=1,10
write (2,'(i2)') p
end do
end program essai |
Partager