program N_data implicit none integer :: N , a ! real*8 :: date , S write(*,*) "open file 'date.dat' " write(*,*) "How many date must input , Please input N " read(*,*) N open (unit=20 ,file='date.dat',status='REPLACE') write(20,*) N a=1 do a = 1 , N ! read(*,*) date write(20,*) a end do close(20) write(*,*)"SAVE in 'date,dat' " stop end program N_data